I have a model object where I want to have a field with a date. For now I am using ZonedDateTime
as it fits our needs.
Hibernate stores this field in the database as a tinyblob
. Can we change the way it is saved in the database to a more readable format and more importantly to a sortable format?
The database used is a mysql db.
This issue has already been resolved as a new improvement to
Hibernate 5.0.0.Beta1
, originally it was bundled in an isolated modulehibernate-java8
Now it is directly bundled in
hibernate-core
, so just make sure that you are using the recent version of it (5.2.X +), in case you are usingmaven
, it should be like this