You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cds/cdl.md
+11-13Lines changed: 11 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,6 @@ uacp: Used as link target from Help Portal at https://help.sap.com/products/BTP/
8
8
---
9
9
10
10
11
-
12
-
13
-
14
11
# Conceptual Definition Language (CDL)
15
12
16
13
@@ -61,10 +58,7 @@ entity Authors : entity {
61
58
62
59
In the example above `entity` shows up as a keyword, as well as an identifier of an aspect declaration and references to that.
63
60
64
-
As indicated by the syntax coloring, `Association` is not a keyword, but a type name identifier, similar to `String`, `Integer`, `Books` and `Authors`.
65
-
66
61
:::
67
-
68
62
Keywords are *case-insensitive*, but are most commonly used in lowercase notation.
69
63
70
64
Identifiers are *case-significant*, that is, `Foo` and `foo` would identify different things.
@@ -76,7 +70,7 @@ type ![Delimited Identifier] : String;
76
70
```
77
71
78
72
::: warning Avoid using delimited identifiers
79
-
Delimited identifiers in general, but in articular non-ansi characters, or keywords as identifiers should be avoided as much as possible, for reasons of interoperability.
73
+
Delimited identifiers in general, but in particular non-ASCII characters, or keywords as identifiers should be avoided as much as possible, for reasons of interoperability.
80
74
:::
81
75
82
76
@@ -98,6 +92,7 @@ The following literals can be used in CDL (mostly as in JavaScript, Java, and SQ
98
92
true , false , null // as in all common languages
99
93
11 , 2.4 , 1e3, 1.23e-11 // for numbers
100
94
'A string''s literal' // for strings
95
+
`A string\n paragraph` // for strings with escape sequences
101
96
{ foo:'boo', bar:'car' } // for records
102
97
[ 1, 'two', {three:4} ] // for arrays
103
98
```
@@ -479,7 +474,7 @@ entity Bar {
479
474
480
475
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.
481
476
482
-
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.
477
+
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.
483
478
484
479
```cds
485
480
entity Employees {
@@ -547,6 +542,9 @@ in queries. Some restrictions apply:
547
542
* Nested projections (inline/expand) are not allowed.
548
543
* A calculated element can't be key.
549
544
545
+
Like for views, the expressions are sent unchanged to the database, so
546
+
you need to ensure that they work on your respective database system(s).
547
+
550
548
A calculated element can be *used* in every location where an expression can occur. A calculated element can't be used in the following cases:
551
549
552
550
* in the ON condition of an unmanaged association
@@ -729,7 +727,7 @@ Use the `as projection on` variant instead of `as select from` to indicate that
729
727
entity Foo as projection on Bar {...}
730
728
```
731
729
732
-
Currently the restrictions of `as projection on` compared to `as select from` are:
730
+
Currently, the restrictions of `as projection on` compared to `as select from` are:
733
731
734
732
- no explicit, manual `JOINs`
735
733
- no explicit, manual `UNIONs`
@@ -956,7 +954,7 @@ Essentially, Compositions are the same as _[associations](#associations)_, just
956
954
::: warning Limitations of Compositions of one
957
955
Using of compositions of one for entities is discouraged. There is often no added value of using them as the information can be placed in the root entity. Compositions of one have limitations as follow:
958
956
- Very limited Draft support. Fiori elements does not support compositions of one unless you take care of their creation in a custom handler.
959
-
- No extensive support for modifications over paths if compostions of one are involved. You must fill in foreign keys manually in a custom handler.
957
+
- No extensive support for modifications over paths if compositions of one are involved. You must fill in foreign keys manually in a custom handler.
960
958
:::
961
959
962
960
### Managed Compositions of Aspects {#managed-compositions}
@@ -1286,8 +1284,8 @@ As described in the [CSN spec](./csn#literals), the previously mentioned annotat
1286
1284
```
1287
1285
1288
1286
::: tip
1289
-
In contrast to references in [expressions](#expressions-as-annotation-values), plain references aren't checked or resolved
1290
-
by CDS parsers or linkers. They're interpreted and evaluated only on consumption-specific modules.
1287
+
In contrast to references in [expressions](#expressions-as-annotation-values), plain references aren't checked, resolved,
1288
+
or rewritten by CDS parsers or linkers. They're interpreted and evaluated only on consumption-specific modules.
1291
1289
For example, for SAP Fiori models, it's the _4odata_ and _2edm(x)_ processors.
1292
1290
:::
1293
1291
@@ -1448,7 +1446,7 @@ and a value written as expression `@aValueExpr: ( 11 )`, respectively.
1448
1446
#### Propagation
1449
1447
1450
1448
[Annotations are propagated](#annotation-propagation) in views/projections, via includes, and along type references.
1451
-
If the annotation value is an expression, it sometimes is necessary to adapt references inside the expression
1449
+
If the annotation value is an expression, it is sometimes necessary to adapt references inside the expression
1452
1450
during propagation, for example, when a referenced element is renamed in a projection.
1453
1451
The compiler automatically takes care of the necessary rewriting. When a reference in an annotation expression
|_Root Cause_| Your IP isn't part of the filtering you configured when you created an SAP HANA Cloud instance. This error can also happen if you exceed the [maximum number of simultaneous connections to SAP HANA Cloud (1000)](https://help.sap.com/docs/HANA_CLOUD_DATABASE/c1d3f60099654ecfb3fe36ac93c121bb/20a760537519101497e3cfe07b348f3c.html). |
0 commit comments