1
0

fix problem with Postgres function array return value in Hibernate 6

This commit is contained in:
Michael Hoennig
2024-01-03 18:13:22 +01:00
parent 063fcf90a3
commit ec53934f30
11 changed files with 78 additions and 16 deletions

View File

@ -47,7 +47,7 @@ public class HsOfficeCoopAssetsTransactionEntity implements Stringifyable {
@Column(name = "transactiontype")
@Enumerated(EnumType.STRING)
@Type(PostgreSQLEnumType.class)
//@Type(PostgreSQLEnumType.class)
private HsOfficeCoopAssetsTransactionType transactionType;
@Column(name = "valuedate")

View File

@ -43,7 +43,7 @@ public class HsOfficeCoopSharesTransactionEntity implements Stringifyable {
@Column(name = "transactiontype")
@Enumerated(EnumType.STRING)
@Type(PostgreSQLEnumType.class)
//@Type(PostgreSQLEnumType.class)
private HsOfficeCoopSharesTransactionType transactionType;
@Column(name = "valuedate")

View File

@ -19,9 +19,9 @@ public interface HsOfficeDebitorRepository extends Repository<HsOfficeDebitorEnt
@Query("""
SELECT debitor FROM HsOfficeDebitorEntity debitor
JOIN HsOfficePartnerEntity partner ON partner.uuid = debitor.partner
JOIN HsOfficePersonEntity person ON person.uuid = partner.person
JOIN HsOfficeContactEntity contact ON contact.uuid = debitor.billingContact
JOIN HsOfficePartnerEntity partner ON partner.uuid = debitor.partner.uuid
JOIN HsOfficePersonEntity person ON person.uuid = partner.person.uuid
JOIN HsOfficeContactEntity contact ON contact.uuid = debitor.billingContact.uuid
WHERE :name is null
OR partner.details.birthName like concat(:name, '%')
OR person.tradeName like concat(:name, '%')

View File

@ -61,7 +61,7 @@ public class HsOfficeMembershipEntity implements Stringifyable {
@Column(name = "reasonfortermination")
@Enumerated(EnumType.STRING)
@Type(PostgreSQLEnumType.class)
//@Type(PostgreSQLEnumType.class)
private HsOfficeReasonForTermination reasonForTermination;
public void setValidFrom(final LocalDate validFrom) {

View File

@ -13,8 +13,8 @@ public interface HsOfficePartnerRepository extends Repository<HsOfficePartnerEnt
@Query("""
SELECT partner FROM HsOfficePartnerEntity partner
JOIN HsOfficeContactEntity contact ON contact.uuid = partner.contact
JOIN HsOfficePersonEntity person ON person.uuid = partner.person
JOIN HsOfficeContactEntity contact ON contact.uuid = partner.contact.uuid
JOIN HsOfficePersonEntity person ON person.uuid = partner.person.uuid
WHERE :name is null
OR partner.details.birthName like concat(:name, '%')
OR contact.label like concat(:name, '%')

View File

@ -37,7 +37,7 @@ public class HsOfficePersonEntity implements Stringifyable {
@Column(name = "persontype")
@Enumerated(EnumType.STRING)
@Type(PostgreSQLEnumType.class)
//@Type(PostgreSQLEnumType.class)
private HsOfficePersonType personType;
@Column(name = "tradename")

View File

@ -47,7 +47,7 @@ public class HsOfficeRelationshipEntity {
@Column(name = "reltype")
@Enumerated(EnumType.STRING)
@Type(PostgreSQLEnumType.class)
//@Type(PostgreSQLEnumType.class)
private HsOfficeRelationshipType relType;
@Override