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 ''. |
|
@rjayasinghe Could you check/approve? |
| <Annotation Term="Common.FieldControl" EnumMember="Common.FieldControlType/Mandatory"/> | ||
| </Annotations> | ||
| ``` | ||
| #### ... in Associations |
There was a problem hiding this comment.
I don't think we need to repeat the section for associations. In associations, only the foreign key is respected. all other elements are not validated, it's not in particular specific for mandatory.
There was a problem hiding this comment.
Should this sentence, for example, be moved to the general section?
LGTM |

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