on 05-30-2022 8:28 AM
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")
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.