How to map a PostgreSQL ARRAY to a Java List with JPA and Hibernate

Introduction In this article, I’m going to show you how to map PostgreSQL ARRAY column types (e.g., text, int, double, enum, date, timestamp, UUID) to Java List entity attributes with JPA and Hibernate. As illustrated by this article, the Hypersistence Utils project provides support for mapping PostgreSQL ARRAY column types to Java Array entity attributes/ However, you can also map database ARRAY columns to java.util.List entity attributes, as it’s much more convenient to use Java Collections than Arrays.

Multidimensional array mapping with JPA and Hibernate

Introduction In this article, I’m going to present the best way to map a Java multidimensional array when using JPA and Hibernate. While one-dimensional array types have long been supported by the Hypersistence Utils open-source project, starting with the 2.9 release, you can now persist multidimensional array entity attributes with JPA and Hibernate.

How to map a PostgreSQL Enum ARRAY to a JPA entity property using Hibernate

Introduction The Hypersistence Utils OSS project allows you to map JSON, ARRAY, YearMonth, Month or database-specific columns (e.g., INET addresses). In this article, we are going to see how you can map a PostgreSQL Enum ARRAY type to a Java array entity property when using JPA and Hibernate.

How to bind custom Hibernate parameter types to JPA queries

Introduction In this article, we are going to see how we can bind a custom Hibernate parameter type to a JPA query. I decided to write this article after one of my hibernate-types framework users created this very interesting issue on GitHub.

The hibernate-types open-source project is born

Introduction Recently, I got a very interesting request from one of my readers. Since I’ve been providing many custom types to support JSON, ARRAY, or nullable Character types, I decided to start a new open-source project to make it easier for you to get these extra Hibernate Types.

How to map Java and SQL arrays with JPA and Hibernate

Introduction In this article, we are going to see how you can map SQL arrays to JPA entity attributes when using Hibernate. Hibernate custom Types allow you to map all sorts of database-specific column types, like IP address, JSON columns, bit sets, or SQL arrays. However, while you can create your own custom Hibernate Types for mapping PostgreSQL arrays, you don’t need to implement your own Hibernate Type. All you need to do is use the Hypersistence Utils open-source project.