How to map the Oracle TIMESTAMP WITH TIME ZONE with JPA

Introduction In this article, I’m going to explain how to map the Oracle TIMESTAMP WITH TIME ZONE with JPA and Hibernate. While the DATE and TIMESTAMP column types are suitable for mapping the LocalDateTime, the TIMESTAMP WITH TIME ZONE column type allows us to map both the ZonedDateTime and OffsetDateTime.

How does the Hibernate JAVA_TIME_USE_DIRECT_JDBC setting work

Introduction In this article, we are going to see how the Hibernate JAVA_TIME_USE_DIRECT_JDBC setting works and what JDBC Driver supports this feature. This setting can be set programmatically, as illustrated by the following Spring Java-based configuration: Or you can set it declaratively in the Spring Boot application.properties configuration file like this:

How to map Date and Timestamp with JPA and Hibernate

Introduction In this article, I’m going to show you what is the best way to map date and timestamp column types when using JPA and Hibernate. While there are many options to map date and timestamp columns on the Java side, as you will soon see, not all of them are suitable.

What’s new in JPA 2.2 – Java 8 Date and Time Types

Introduction In this article, we are going to see how JPA 2.2 Date/Time works, and which types you need to use depending on your business case requirements.