Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion java/fiori-drafts.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ These events have the same semantics as described in section [Handling CRUD even


::: tip POST Behavior with Direct CRUD
With the 4.9.0 release, CAP Java introduced a mode where `POST` without a value for `IsActiveEntity` in the payload results in the `CqnService.EVENT_CREATE` (creation of an active entity) for the given entity. This mode is automatically active when the entity is annotated with `@Common.DraftRoot.NewAction`, which is generated by the CDS compiler when the `cds_fiori_direct__crud` flag is set. It can also be added via explicit modeling. The annotation value needs to be the name of a bound action in the same service. If the entity has a key of type `UUID`, the action needs no further parameters. Otherwise, the action needs the key values of the entity as parameters. The behavior can be overridden via the `cds.drafts.post-active` property set to `false`.

With the 4.9.0 release, CAP Java introduced a mode where `POST` without a value for `IsActiveEntity` in the payload results in the `CqnService.EVENT_CREATE` (creation of an active entity) for the given entity. This mode is automatically active when the entity is annotated with `@Common.DraftRoot.NewAction`, which is generated by the CDS compiler when the `cds_fiori_draft_new_action` (before cds 10, `cds_fiori_direct_crud`) flag is set. It can also be added via explicit modeling.

The annotation value needs to be the name of a bound action in the same service. If the entity has a key of type `UUID`, the action needs no further parameters. Otherwise, the action needs the key values of the entity as parameters. The behavior can be overridden by setting the `cds.drafts.post-active` property to `false`.
:::

::: warning Draft locks still apply
Expand Down
Loading