How to escape SQL reserved keywords with JPA and Hibernate

Introduction In this article, we are going to see how you can escape SQL reserved keywords with JPA and Hibernate. I decided to write this article because I keep on seeing this problem on the Hibernate forum or StackOverflow.

How to map a PostgreSQL Range column type with JPA and Hibernate

Introduction In this article, we are going to see how to map the PostgreSQL range column types with JPA and Hibernate. Luckily, you don’t have to implement a custom Hibernate type for the PostgreSQL range column type since the Hypersistence Utils project already provides support for it.

How to get the current database transaction id

Introduction In this article, I’m going to show you how to get the current database transaction id. The transaction id is very useful for logging, especially if you want to correlate multiple log entries that are executed within the context of the same database transaction.

How to map a PostgreSQL HStore entity property with JPA and Hibernate

Introduction The Hypersistence Utils open-source project allows you to map a great variety of database types that are not supported natively by Hibernate ORM (e.g. JSON, ARRAY, YearMonth, Month, INET addresses). In this article, we are going to see how you can map a PostgreSQL HStore type, which allows you to store key/value pairs, to a Java Map entity property when using JPA and Hibernate.