fix relType, which was not mapped by OpenApi anymore of there is relTypeMark, by renaming relTypeMark to relMark - strange!

This commit is contained in:
Michael Hoennig 2024-01-25 15:30:06 +01:00
parent 53c3b04ba1
commit 82573d1c9f
4 changed files with 8 additions and 7 deletions

View File

@ -54,8 +54,8 @@ public class HsOfficeRelationshipEntity implements HasUuid, Stringifyable {
@Enumerated(EnumType.STRING) @Enumerated(EnumType.STRING)
private HsOfficeRelationshipType relType; private HsOfficeRelationshipType relType;
@Column(name = "reltypemark") @Column(name = "relmark")
private String relTypeMark; private String relMark;
@Override @Override
public String toString() { public String toString() {

View File

@ -26,7 +26,7 @@ components:
$ref: './hs-office-person-schemas.yaml#/components/schemas/HsOfficePerson' $ref: './hs-office-person-schemas.yaml#/components/schemas/HsOfficePerson'
relType: relType:
type: string type: string
relTypeMark: relMark:
type: string type: string
nullable: true nullable: true
contact: contact:
@ -51,9 +51,9 @@ components:
format: uuid format: uuid
relType: relType:
type: string type: string
relTypeMark:
type: string
nullable: true nullable: true
relMark:
type: string
contactUuid: contactUuid:
type: string type: string
format: uuid format: uuid

View File

@ -22,7 +22,7 @@ create table if not exists hs_office_relationship
relHolderUuid uuid not null references hs_office_person(uuid), relHolderUuid uuid not null references hs_office_person(uuid),
contactUuid uuid references hs_office_contact(uuid), contactUuid uuid references hs_office_contact(uuid),
relType HsOfficeRelationshipType not null, relType HsOfficeRelationshipType not null,
relTypeMark varchar(24) relMark varchar(24)
); );
--// --//

View File

@ -761,7 +761,8 @@ public class ImportOfficeData extends ContextBasedTest {
for (String subscriberRole: SUBSCRIBER_ROLES) { for (String subscriberRole: SUBSCRIBER_ROLES) {
if (containsRole(rec, subscriberRole)) { if (containsRole(rec, subscriberRole)) {
addRelationship(partnerPerson, contactPerson, contact, HsOfficeRelationshipType.SUBSCRIBER) addRelationship(partnerPerson, contactPerson, contact, HsOfficeRelationshipType.SUBSCRIBER)
.setRelTypeMark(subscriberRole.split(":")[1]); .setRelMark(subscriberRole.split(":")[1])
;
} }
} }
verifyContainsOnlyKnownRoles(rec.getString("roles")); verifyContainsOnlyKnownRoles(rec.getString("roles"));