The post Date and Time Mappings with Hibernate and JPA appeared first on Thorben Janssen. Databases support various data types to store date and time information. The most commonly used ones are: You can map all of them with JPA and Hibernate. But you need to decide to which Java type you want to map your database column. The Java language supports a bunch of classes to represent date and... The post Date and Time Mappings with Hibernate and JPA appeared first on Thorben Janssen.| Thorben Janssen
The post Implement your primary key as a Record using an IdClass appeared first on Thorben Janssen. There are various reasons to implement your own primary key representation. Your primary key may consist of multiple attributes. Or you’re following domain-driven design principles and want to use a custom type to add semantic meaning to it. Implementing a record and mapping it as an IdClass seems evident in these situations. A record is efficient, easy to implement, immutable... The pos...| Thorben Janssen
Hibernate 6 introduced a huge improvement to the mapping of ZonedDateTime and OffsetDateTime.| Thorben Janssen