Skip to content

Commit 391e4b4

Browse files
virtual elements need to be provided (#2099)
@beckermarc any objection from your side? --------- Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>
1 parent b5e46e7 commit 391e4b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cds/cdl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ entity Bar {
478478

479479
An element definition can be prefixed with modifier keyword `virtual`. This keyword indicates that this element isn't added to persistent artifacts, that is, tables or views in SQL databases. Virtual elements are part of OData metadata.
480480

481-
By default, virtual elements are annotated with `@Core.Computed: true`, not writable for the client and will be [silently ignored](../guides/providing-services#readonly). This means also, that they are not accessible in custom event handlers. If you want to make virtual elements writable for the client, you explicitly need to annotate these elements with `@Core.Computed: false`. Still those elements are not persisted and therefore, for example, not sortable or filterable.
481+
By default, virtual elements are annotated with `@Core.Computed: true`, not writable for the client and will be [silently ignored](../guides/providing-services#readonly). This means also, that they are not accessible in custom event handlers. If you want to make virtual elements writable for the client, you explicitly need to annotate these elements with `@Core.Computed: false`. Still those elements are not persisted and therefore, for example, not sortable or filterable. Further, during read requests, you need to provide values for all virtual elements. You can do this by using post-processing in an `after` handler.
482482

483483
```cds
484484
entity Employees {

0 commit comments

Comments
 (0)