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. While the Hibernate Types project has been supporting PostgreSQL ARRAY column types since the very first version, prior to version 2.9, you could only map database ARRAY columns to Java Array entity attributes, as illustrated by this article. Mapping database ARRAY columns to java.util.List entity attributes is a much better approach than using the previous Java Array option since,… Read More
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 Hibernate Types open-source project, starting with the 2.9 release, you can now persist multidimensional array entity attributes with JPA and Hibernate.
Introduction The open-source hibernate-types 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.
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.
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 this extra Hibernate Types.
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 Hibernate Types open-source project.