Tuesday - last edited Tuesday
Hi all,
I’ve established a basic parent-child association in my SAP on-premise backend and am consuming this OData service in my CAP application. However, while attempting to send a deep entity request to the backend, I consistently encountered the following error message:
'Property "0" does not exist in XXXItemSet'.
At first, I suspected an issue with our backend design, but after reviewing it thoroughly, we turned our attention to CAP since nothing seemed amiss with the backend.
The error message originated from the file /node_modules/@sap/cds/lib/linked/validate.js, and after some debugging, we identified the problematic check at line 202 (@sap/cds version 8.3.0):
else if (d['@cds.validate'] !== false) d.validate(data[each], path_, ctx)
To test this, I modified the CSN file by manually appending the @CDS.validateas false property to the generated association element. This allowed me to bypass the check and proceed with the process, eventually reaching the backend method successfully. Here’s the updated part of the CSN file:
"XXXItemSet": {
"@cds.validate": false,
"type": "cds.Association",
"target": "Dummy_SRV.XXXItemSet",
"cardinality": {
"max": "*"
},
"keys": []
},
Thanks!
Merve
User | Count |
---|---|
71 | |
10 | |
10 | |
10 | |
10 | |
8 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.