-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add limiation section for deep write #1611
base: main
Are you sure you want to change the base?
Conversation
guides/providing-services.md
Outdated
1. The on-condition of the composition only uses `=` operator | ||
2. Expressions are combined with the logical operator `AND` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and no negation not(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also for deep writes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't support writing via on-conditions using negation.
not(...)
can be rewritten using !=
, which is covered by condition 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somehow I misread the initial comment and though you do support not(...)
.
In essence, you also only support AND
. OR/NOT
are not supported generically?!.
We could emphasize this with
1. The on-condition of the composition only uses `=` operator | |
2. Expressions are combined with the logical operator `AND` | |
2. The predicates are only connected with the logical operator `AND` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct, writing via on-conditions using OR
or NOT
is not supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed the sentence now to above proposal. fine for you?
|
||
Bad: | ||
```cds | ||
entity Orders { | ||
key ID : UUID; | ||
title : String; | ||
Items : Composition of many OrderItems on substring(title, 0, 1) <= 'F' or Items.pos > 12; | ||
} | ||
entity OrderItems { | ||
key order : Association to Orders; | ||
key pos : Integer; | ||
descr: String; | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would avoid bad examples in the documentation There's always a risk that someone copies them.
Co-authored-by: Adrian Görler <[email protected]>
@agoerler @beckermarc Please double check whether these limitations also apply to CAP Java.
@renejeglinsky Do we have a better pattern to signal good/bad?