From 70b12bba589d182d1f32d92a53c81372cbb42e00 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Tue, 14 Jan 2025 17:06:02 +0100 Subject: [PATCH] make HsOfficeDebitorEntity.partner mandatory --- .../hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java | 4 +--- .../hs/office/debitor/HsOfficeDebitorRepository.java | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java b/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java index ecce6e74..8fc5c0f6 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java @@ -17,7 +17,6 @@ import net.hostsharing.hsadminng.rbac.generator.RbacSpec; import net.hostsharing.hsadminng.rbac.generator.RbacSpec.SQL; import net.hostsharing.hsadminng.repr.Stringify; import net.hostsharing.hsadminng.repr.Stringifyable; -import org.hibernate.annotations.GenericGenerator; import org.hibernate.annotations.JoinFormula; import org.hibernate.annotations.NotFound; import org.hibernate.annotations.NotFoundAction; @@ -76,7 +75,6 @@ public class HsOfficeDebitorEntity implements BaseEntity, @Id @GeneratedValue - @GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator") private UUID uuid; @Version @@ -96,7 +94,7 @@ public class HsOfficeDebitorEntity implements BaseEntity, WHERE pRel.holderUuid = dRel.anchorUuid ) """) - @NotFound(action = NotFoundAction.IGNORE) // TODO.impl: map a simplified raw-PartnerEntity, just for the partner-number + @NotFound(action = NotFoundAction.EXCEPTION) // TODO.impl: map a simplified raw-PartnerEntity, just for the partner-number private HsOfficePartnerRealEntity partner; @Column(name = "debitornumbersuffix", length = 2) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorRepository.java b/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorRepository.java index fa02053b..588f7a00 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorRepository.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorRepository.java @@ -19,7 +19,7 @@ public interface HsOfficeDebitorRepository extends Repository