In hibernate, how does the array field of postgresql map a list < Object > through @ OneToMany?

I have an entity, for address and an entity, for Person, and he has an attribute address_ids; in it, which is an int [] type, which contains an array of address"s id.

how to map this address_ids field directly to an object of List < Address >.

or is there any other way to implement

I use spring data jpa

Mar.16,2021

because JDBC doesn't have this type, you have to implement the UserType interface of Hibernate yourself, and implement the mapping binding yourself.

Grails's postgresql plug-in learn about ? Its source code can be used as a reference to achieve the jsonb type and array type of postgresql.

this plug-in basically supports various data types of postgresql, which is done by defining UserType by yourself. The source code is under this package: https://github.com/kaleidos/g.

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e8ac8d-1003.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e8ac8d-1003.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?