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 Hibernate Types open-source project, starting with the 2.9 release, you can now persist multidimensional array entity attributes with JPA and Hibernate. Domain Model Let’s assume we have a plane seat reservation application, and each plane is represented in the database using the following table: Notice that the seat_grid column is of the seat_status[] type. The seat_status is a PostgreSQL enum… Read More

The post Multidimensional array mapping with JPA and Hibernate appeared first on Vlad Mihalcea.

Source: Vlad Mihalcea