Skip to content

Commit 6af9df0

Browse files
Release 2015-02-05 (#1622)
2 parents c51f397 + 7b0f878 commit 6af9df0

9 files changed

Lines changed: 281 additions & 255 deletions

File tree

cds/cdl.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ uacp: Used as link target from Help Portal at https://help.sap.com/products/BTP/
88
---
99

1010

11-
12-
13-
1411
# Conceptual Definition Language (CDL)
1512

1613

@@ -61,10 +58,7 @@ entity Authors : entity {
6158

6259
In the example above `entity` shows up as a keyword, as well as an identifier of an aspect declaration and references to that.
6360

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-
6661
:::
67-
6862
Keywords are *case-insensitive*, but are most commonly used in lowercase notation.
6963

7064
Identifiers are *case-significant*, that is, `Foo` and `foo` would identify different things.
@@ -76,7 +70,7 @@ type ![Delimited Identifier] : String;
7670
```
7771

7872
::: 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.
8074
:::
8175

8276

@@ -98,6 +92,7 @@ The following literals can be used in CDL (mostly as in JavaScript, Java, and SQ
9892
true , false , null // as in all common languages
9993
11 , 2.4 , 1e3, 1.23e-11 // for numbers
10094
'A string''s literal' // for strings
95+
`A string\n paragraph` // for strings with escape sequences
10196
{ foo:'boo', bar:'car' } // for records
10297
[ 1, 'two', {three:4} ] // for arrays
10398
```
@@ -479,7 +474,7 @@ entity Bar {
479474

480475
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.
481476

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.
483478

484479
```cds
485480
entity Employees {
@@ -547,6 +542,9 @@ in queries. Some restrictions apply:
547542
* Nested projections (inline/expand) are not allowed.
548543
* A calculated element can't be key.
549544

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+
550548
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:
551549

552550
* 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
729727
entity Foo as projection on Bar {...}
730728
```
731729

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:
733731

734732
- no explicit, manual `JOINs`
735733
- no explicit, manual `UNIONs`
@@ -956,7 +954,7 @@ Essentially, Compositions are the same as _[associations](#associations)_, just
956954
::: warning Limitations of Compositions of one
957955
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:
958956
- 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.
960958
:::
961959

962960
### Managed Compositions of Aspects {#managed-compositions}
@@ -1286,8 +1284,8 @@ As described in the [CSN spec](./csn#literals), the previously mentioned annotat
12861284
```
12871285

12881286
::: 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.
12911289
For example, for SAP Fiori models, it's the _4odata_ and _2edm(x)_ processors.
12921290
:::
12931291

@@ -1448,7 +1446,7 @@ and a value written as expression `@aValueExpr: ( 11 )`, respectively.
14481446
#### Propagation
14491447

14501448
[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
14521450
during propagation, for example, when a referenced element is renamed in a projection.
14531451
The compiler automatically takes care of the necessary rewriting. When a reference in an annotation expression
14541452
is rewritten, the `=` property is set to `true`.

get-started/learning-sources.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ Based on this sample application, you find the bill of materials and a sizing ex
171171
## Tutorials
172172

173173
- [TechEd 2023 Hands-On Session AD264 – Build Extensions with CAP](https://github.com/SAP-samples/teched2023-AD264/)
174+
- [TechEd 2022 Hands-On Session AD264 – Verticalization, Customization, Composition](https://github.com/SAP-archive/teched2022-AD264)
174175
- [Build a Business Application Using CAP for Node.js](https://developers.sap.com/mission.cp-starter-extensions-cap.html)
175176
- [Build a Business Application Using CAP for Java](https://developers.sap.com/mission.cap-java-app.html)
176177
- [CAP Service Integration CodeJam](https://github.com/sap-samples/cap-service-integration-codejam) by DJ Adams

get-started/troubleshooting.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,11 @@ Options in [Saas Provisioning Service upgrade API](../guides/multitenancy/mtxs#e
489489
| _Root Cause_ | Your configuration isn't properly set. |
490490
| _Solution_ | Configure your project as described in [Using Databases](../guides/databases).
491491

492+
492493
#### Deployment fails — _Connection failed (RTE:[89008] Socket closed by peer_ {#connection-failed-89008}
493494

495+
#### Hybrid testing connectivity issue — _ResourceRequest timed out_ {style="margin-top: 0;"}
496+
494497
| | Explanation |
495498
| --- | ---- |
496499
| _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

Comments
 (0)