Hi community,
I’m working with CAP Java and trying to implement soft deletion for items removed from the Object Page table.
When a user deletes an item (Composition Child) in edit mode, I mark the item as logically deleted by setting isDeleted = true.
I achieved this by setting the flag in the @On DraftService.EVENT_DRAFT_CANCEL event handler.
However, when the isDeleted field is annotated with @readonly, @Core.Immutable, or @Common.FieldControl: #ReadOnly, the flag is not transferred to the active entity when the draft is activated.
This issue occurs only in CAP Java — the same logic works correctly in CAP Node.js.
I’ve created a minimal reproducible example on GitHub:
https://github.com/miyasuta/cap-java-draft-composition-delete
Has anyone experienced similar behavior or knows whether this is a known limitation of CAP Java drafts?
Request clarification before answering.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.