clarify @mandatory is not validated in deep updates - #2585
Conversation
…egarding Fiori
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>
|
@johannes-vogel @agoerler could you have a quick check here? |
|
@rjayasinghe Have you reviewed this PR? |
|
The changes in this PR reflect the Node.js runtime — they do not hold for CAP Java. The statement " In CAP Java,
So for Java it's not "no validation on nested data" — it's "a missing mandatory value is not enforced on update, but an explicitly provided This is backed by the unit tests in Suggested framing: keep the current sentence under a Node.js tab, and for Java state that mandatory is validated in nested cascading targets, with only a missing value left unenforced (use |
|
@rjayasinghe As I understand it, Java does not validate @mandatory, except for compositions where the value is explicitly set to null or ''. |
| ``` | ||
|
|
||
| In addition to server-side input validation as introduced above, this adds a corresponding `@FieldControl` annotation to the EDMX so that OData / Fiori clients would enforce a valid entry, thereby avoiding unnecessary request roundtrips: | ||
| ::: warning Deep updates not covered |
There was a problem hiding this comment.
Would that be enough to merge this PR?
| ::: warning Deep updates not covered | |
| ::: warning Deep updates not covered in Node.js |
There was a problem hiding this comment.
@renejeglinsky It looks like Node.js also supports the same use case as the Java runtime, so we can provide common documentation. Could you please check if the changed docu is ok ?
Updated documentation regarding @mandatory annotation. There is no validation on @mandatory in deep updates usecase.
Removed section with
@FieldControl, as it is mentioned already inField ControlbelowFixes: https://github.tools.sap/cap/cdsnode/issues/2637