4 weeks ago
Hi Community,
I'm currently working on an SAP RAP unmanaged scenario using Custom Entities in ABAP Cloud, and I’ve run into an issue when trying to expose metadata.
I have two custom entities defined as follows:
Root Entity:
@EndUserText.label: 'Custom Root entity for Parent'
define root custom entity ZParent {
@OData.property.name: 'SessionId'
key SESSION_ID : abap.int1;
_Child : composition [1..1] of ZChild;
}
Child Entity:
@EndUserText.label: 'Custom entity for Child'
define custom entity ZChild {
@OData.property.name: 'SessionId'
key SESSION_ID : abap.int1;
_Parent : association to parent ZParent on _Parent.SESSION_ID = $projection.SESSION_ID;
}
When I try to access the $metadata of the service, I receive the following error:
Code: SY/530
Message: Association assoc_0FCF7701A629F6O035FFE9E6E21380F1: referential constraint property not found in entity ZChildType.
Interestingly, the error does not occur when the @odata.property.name annotation is removed.
Does the RAP framework not automatically handle property name mapping when using @odata.property.name?
Is there an annotation or recommended approach to handle referential constraints in this case?
Any insights or guidance would be greatly appreciated!
Thanks & Regards,
Aftab
Request clarification before answering.
There is no global "read only mode" switch for application users.
One option I can think off is to create a roles-model that differentiates between reading and writing.
To disable writing you could then revoke the data change privileges from the writing role(s).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
22 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.