I have found many, many guides to implementing a custom usertype in Hibernate ORM, but when it comes to OGM, the web is almost silent.
I trying to convert a simple project from using a MySQL backend to using Neo4j.
I’m using the latest release of Hibernate OGM (5.3.1).
In my current implementation i have a UserType mapping LocalDateTime and other customer objects to columns in MySQL - works great.
However having moved to OGM, I not get errors like:
Caused by: org.hibernate.HibernateException: OGM000059: Unable to find a GridType for LocalDateTime
How do I correctly handle custom objects like LocalDateTime objects (and other custom objects) in Hibernate OGM?
At the moment there is not a mechanism similar to ORM for custom grid types in OGM.
Depending on the use case, there are 3 ways to add custom types at the moment:
With a TypeContributor like in the example you have already found