I'm not sure if it's related, but as far as I know, OGM does not yet support the native chrono or spatial Neo4j types. This is true for me on Neo4j 3.4.5 / OGM 3.1.2. I just re-proved this early today by attempting to set dates on nodes in a plugin, using OffsetDateTime.now().toInstant()
, and then map via OGM to a Date field on my entity, which results in the error.
My simple workaround (until this is addressed) is to store OffsetDateTime.now().toInstant().toEpochMilli()
in the DB, and use a long
in my entity, which maps fine. Then again, I'm just passing them through, or this might be more annoying. There may be better workarounds, and/or they may fix this in OGM 3.2.