kotlin-nosql icon indicating copy to clipboard operation
kotlin-nosql copied to clipboard

DateTimeHandling Incorrect in MongoDBSession::getObject(doc: DBObject, column: AbstractColumn<*, *, *>)

Open cojo opened this issue 9 years ago • 0 comments

Hi,

While using this package we've run into an issue with the dateTime() / DATE_TIME column type in MongoDBSession - while getObject(doc, schema) on line 489 properly handles DATE_TIME column type instantiation from the string pulled from Mongo, getObject(doc: DBObject, column: AbstractColumn<*, *, *>) on line 532 does not, and instead just does a basic doc.get which will fail for the DATE_TIME columns with something like:

java.lang.IllegalArgumentException: Can not set final org.joda.time.DateTime field expirationDate to java.lang.String

Let me know if you need further details or if there's anything else I can do to help. Thanks!

cojo avatar Apr 19 '16 00:04 cojo