I can write a Calendar instance to MongoDB, but when I read it back, it's always
java.util.GregorianCalendar[time=0,…
My record looks like this:
class LogEntry extends MongoRecord[LogEntry] with MongoId[LogEntry] {
def meta = LogEntry
object text extends StringField(this, 1000)
object entryType extends EnumField(this, LogEntryType)
object date extends DateTimeField(this)
}
It gets writing to MongoDB like this
{ "text" : "A", "date" : ISODate("2012-05-18T14:34:42.768Z"), "_id" : ObjectId("4fb65e0296466a4e7c761601"), "entryType" : 0 }
but when I read it back in the date is 0. I have no idea what's going on here…
/Daniel