Search code examples
spring-boothsqldbhibernate-5.x

Spring Boot 1.4: LocalDateTime mapped to varbinary instead of timestamp type


I am using Java 8, Spring Boot 1.4 and hsqldb. I have an entity with java.time.LocalDateTime field. When I check sql generated by hibernate, it is using varbinary as data type. How do I make it use timestamp data type?

Update: It does work when I add hibernate-java8 (5.1.0.Final) dependency. But it does not work with hibernate-java8 (5.2.x versions). This might be because Java 8 support was added to hibernate-core 5.2 itself.


Solution

  • It works when hibernate-java8 (5.1.0.Final) dependency is added. It DOES NOT work with hibernate-java8 (5.2.x versions). This is because Java 8 support was added to hibernate-core 5.2 itself.