I have such Object:
data class Task(var id: Int? = null,
var cabinId: Int = 0,
var startTime: DateTime,
var endTime: DateTime? = null
)
when I write document it is totaly okey:
db.collection("games").document(game.idForTitle)
.set(game)
.addOnSuccessListener { documentReference ->
Log.d(TAG, "DocumentSnapshot written with ID: ${documentReference}")
}
.addOnFailureListener { e ->
Log.w(TAG, "Error adding document", e)
}
but when I try to update the endTime field it throws:
java.lang.IllegalArgumentException: Invalid data. Unsupported type: org.joda.time.DateTime (found in field endTime)
The intersting thing is that startTime filed is writen as map, but endTime is null type.
Anyone knows what to do?