just a single find method in hs-office-membership repo
This commit is contained in:
parent
e6f9484f99
commit
0232ff078d
@ -13,13 +13,12 @@ public interface HsOfficeMembershipRepository extends Repository<HsOfficeMembers
|
||||
|
||||
@Query("""
|
||||
SELECT membership FROM HsOfficeMembershipEntity membership
|
||||
WHERE :memberNumber is null
|
||||
OR membership.memberNumber = :memberNumber
|
||||
WHERE (:memberNumber is null OR membership.memberNumber = :memberNumber)
|
||||
AND ( CAST(:partnerUuid as org.hibernate.type.UUIDCharType) IS NULL
|
||||
OR membership.partner.uuid = :partnerUuid )
|
||||
ORDER BY membership.memberNumber
|
||||
""")
|
||||
List<HsOfficeMembershipEntity> findMembershipByOptionalMemberNumber(Integer memberNumber);
|
||||
|
||||
List<HsOfficeMembershipEntity> findMembershipsByPartnerUuid(UUID partnerUuid);
|
||||
List<HsOfficeMembershipEntity> findMembershipsByOptionalPartnerUuidAndOptionalMemberNumber(UUID partnerUuid, Integer memberNumber);
|
||||
|
||||
HsOfficeMembershipEntity save(final HsOfficeMembershipEntity entity);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user