Dear community,
within our CAP model we intend to have an assignment table which can be maintained by two different root entities as follows:
db reference model:
entity PARTY { key ID : UUID; NAME : String; PARTY_PEOPLE : Composition of many PARTY_PEOPLE on PARTY_PEOPLE.PARTY = $self; } entity PARTY_PEOPLE { ID : UUID; PERSON_ID : UUID; PERSON: Association to PERSON: on PERSON.ID = PERSON_ID; key PARTY: Association to PARTY; key EVENT: Association to EVENT; } entity PERSON { key ID : UUID; NAME : String; } entity EVENT{ key ID : UUID; NAME : String; PARTY_PEOPLE : Composition of many PARTY_PEOPLE on PARTY_PEOPLE.EVENT = $self; }service.cds:
@path : '/test' service TestService { @odata.draft.enabled entity PARTY as projection on TEST.PARTY; entity PARTY_PEOPLE as projection on TEST.PARTY_PEOPLE; @odata.draft.enabled entity EVENT as projection on TEST.EVENT; }by testing this the CAP always throws the following error:[ERROR] srv/service.cds:9:12: Entity “TestService.PARTY_PEOPLE.drafts” already generated by draft root "TestService.PARTY" (in entity:"TestService.EVENT")