You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, there is a following DTO in PostgreSQL:
create table email
(
account_id varchar(100),
id varchar(100),
recipients recipient[],
subject varchar(100),
content varchar(100)
);
create type recipient as
(
email text,
name text
);
I am not so good at Hibernate to make PR to fix it.
But using plain SQL it works in a following way: INSERT INTO public.email (account_id, id, recipients, subject, content) VALUES ('qwerty', 'aa12345', '{([email protected],"frank"),([email protected],"john")}', 'mysubject', 'mycontent');
This would be much easier to implement if pgjdbc had support for structs. Unfortunately they abandoned the idea for probably the same reasons this should not be implemented as part of hibernate-types: pgjdbc/pgjdbc#381.
For example, there is a following DTO in PostgreSQL:
There is an option to use PostgreSQL array:
https://vladmihalcea.com/postgresql-array-java-list/
But there is no option to use in PostgreSQL array custom types.
With Regards
The text was updated successfully, but these errors were encountered: