@sap/cds-compiler 6.4.6 → 6.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -1156
- package/README.md +1 -10
- package/bin/cdsc.js +1 -1
- package/doc/IncompatibleChanges_v5.md +436 -0
- package/doc/IncompatibleChanges_v6.md +659 -0
- package/doc/Versioning.md +3 -7
- package/lib/api/main.js +1 -0
- package/lib/api/options.js +5 -0
- package/lib/api/validate.js +3 -0
- package/lib/base/message-registry.js +31 -8
- package/lib/base/messages.js +1 -1
- package/lib/base/model.js +3 -2
- package/lib/checks/actionsFunctions.js +6 -3
- package/lib/checks/existsInForbiddenPlaces.js +32 -0
- package/lib/checks/validator.js +2 -0
- package/lib/compiler/assert-consistency.js +3 -5
- package/lib/compiler/checks.js +4 -8
- package/lib/compiler/define.js +330 -558
- package/lib/compiler/extend.js +302 -18
- package/lib/compiler/finalize-parse-cdl.js +2 -10
- package/lib/compiler/generate.js +33 -5
- package/lib/compiler/kick-start.js +8 -7
- package/lib/compiler/populate.js +25 -70
- package/lib/compiler/propagator.js +1 -2
- package/lib/compiler/resolve.js +4 -13
- package/lib/compiler/shared.js +18 -5
- package/lib/compiler/tweak-assocs.js +13 -9
- package/lib/compiler/utils.js +98 -2
- package/lib/compiler/xpr-rewrite.js +2 -1
- package/lib/edm/annotations/edmJson.js +9 -6
- package/lib/edm/annotations/genericTranslation.js +8 -4
- package/lib/edm/csn2edm.js +3 -4
- package/lib/edm/edmInboundChecks.js +1 -2
- package/lib/edm/edmPreprocessor.js +3 -3
- package/lib/gen/CdlGrammar.checksum +1 -1
- package/lib/gen/CdlParser.js +1 -1
- package/lib/gen/Dictionary.json +16 -1
- package/lib/json/from-csn.js +4 -6
- package/lib/json/to-csn.js +3 -3
- package/lib/model/csnRefs.js +19 -5
- package/lib/model/enrichCsn.js +4 -2
- package/lib/optionProcessor.js +8 -4
- package/lib/render/toSql.js +0 -4
- package/lib/render/utils/sql.js +3 -2
- package/lib/transform/db/applyTransformations.js +1 -1
- package/lib/transform/db/assertUnique.js +3 -3
- package/lib/transform/db/assocsToQueries/normalizeFrom.js +33 -0
- package/lib/transform/db/assocsToQueries/transformExists.js +14 -3
- package/lib/transform/db/assocsToQueries/utils.js +1 -1
- package/lib/transform/db/backlinks.js +4 -4
- package/lib/transform/db/cdsPersistence.js +4 -4
- package/lib/transform/db/constraints.js +4 -4
- package/lib/transform/db/expansion.js +5 -5
- package/lib/transform/db/flattening.js +4 -5
- package/lib/transform/db/rewriteCalculatedElements.js +3 -3
- package/lib/transform/db/temporal.js +11 -11
- package/lib/transform/draft/db.js +2 -0
- package/lib/transform/draft/odata.js +5 -7
- package/lib/transform/effective/flattening.js +1 -2
- package/lib/transform/forOdata.js +3 -3
- package/lib/transform/forRelationalDB.js +1 -1
- package/lib/transform/odata/createForeignKeys.js +1 -2
- package/lib/transform/odata/flattening.js +1 -2
- package/lib/transform/odata/toFinalBaseType.js +52 -55
- package/lib/transform/transformUtils.js +3 -4
- package/package.json +1 -1
- package/doc/CHANGELOG_BETA.md +0 -464
- package/doc/CHANGELOG_DEPRECATED.md +0 -235
package/doc/CHANGELOG_BETA.md
DELETED
|
@@ -1,464 +0,0 @@
|
|
|
1
|
-
# ChangeLog of beta Features for CDS compiler and backends
|
|
2
|
-
|
|
3
|
-
<!-- markdownlint-disable MD024 -->
|
|
4
|
-
<!-- markdownlint-disable MD004 -->
|
|
5
|
-
<!-- (no-duplicate-heading)-->
|
|
6
|
-
|
|
7
|
-
Note: `beta` fixes, changes and features are listed in this ChangeLog just for information.
|
|
8
|
-
The compiler behavior concerning `beta` features can change at any time without notice.
|
|
9
|
-
**Don't use `beta` fixes, changes and features in productive mode.**
|
|
10
|
-
|
|
11
|
-
## Version 6.0.8 - 2025-05-23
|
|
12
|
-
|
|
13
|
-
### Added `v7preview`
|
|
14
|
-
|
|
15
|
-
Use this beta flag to enable features that will be available for cds-compiler v7.
|
|
16
|
-
It also enables new warnings and errors that are intended for the next version.
|
|
17
|
-
|
|
18
|
-
### Removed `v6preview`
|
|
19
|
-
|
|
20
|
-
Features are now enabled by default.
|
|
21
|
-
|
|
22
|
-
## Version 5.8.0 - 2025-02-27
|
|
23
|
-
|
|
24
|
-
### Added `v6preview`
|
|
25
|
-
|
|
26
|
-
Use this beta flag to enable features that will be available for cds-compiler v6.
|
|
27
|
-
It also enables new warnings and errors that are intended for the next version.
|
|
28
|
-
|
|
29
|
-
## Version 5.3.0 - 2024-09-25
|
|
30
|
-
|
|
31
|
-
### Removed `optionalActionFunctionParameters`
|
|
32
|
-
|
|
33
|
-
It is now enabled by default.
|
|
34
|
-
|
|
35
|
-
## Version 5.0.0 - 2024-05-29
|
|
36
|
-
|
|
37
|
-
## Removed `v5preview`
|
|
38
|
-
|
|
39
|
-
It is now enabled by default.
|
|
40
|
-
|
|
41
|
-
## Version 4.9.0 - 2024-04-25
|
|
42
|
-
|
|
43
|
-
### Removed `odataAnnotationExpressions`
|
|
44
|
-
|
|
45
|
-
It is now enabled by default.
|
|
46
|
-
|
|
47
|
-
### Removed `odataPathsInAnnotationExpressions`
|
|
48
|
-
|
|
49
|
-
It is now enabled by default.
|
|
50
|
-
|
|
51
|
-
### Removed `annotationExpressions`
|
|
52
|
-
|
|
53
|
-
It is now enabled by default.
|
|
54
|
-
|
|
55
|
-
### Added `temporalRawProjection`
|
|
56
|
-
|
|
57
|
-
Enables revocation of temporal where clause in projections of temporal entities if the
|
|
58
|
-
`@cds.valid { from, to }` annotations on the projection elements have falsy values.
|
|
59
|
-
|
|
60
|
-
## Version 4.8.0 - 2024-03-21
|
|
61
|
-
|
|
62
|
-
### Removed `vectorType`
|
|
63
|
-
|
|
64
|
-
It is now always enabled.
|
|
65
|
-
|
|
66
|
-
### Added `v5preview`
|
|
67
|
-
|
|
68
|
-
Sneak preview into incompatible changes that are about to be shipped with compiler version 5.
|
|
69
|
-
|
|
70
|
-
## Version 4.6.0 - 2024-01-26
|
|
71
|
-
|
|
72
|
-
### Added `vectorType`
|
|
73
|
-
|
|
74
|
-
Using this beta flag, the new type `cds.Vector` is available for modeling.
|
|
75
|
-
|
|
76
|
-
## Version 4.5.0 - 2023-12-08
|
|
77
|
-
|
|
78
|
-
### Added `odataAnnotationExpressions`
|
|
79
|
-
|
|
80
|
-
This flag allows to use expressions as annotation values, e.g.
|
|
81
|
-
`@anno: (1+2)` and to enable OData specific transformations on those expressions.
|
|
82
|
-
|
|
83
|
-
### Added `tenantVariable`
|
|
84
|
-
|
|
85
|
-
If this beta flag is enabled, variable `$tenant` can be used without explicit replacement value.
|
|
86
|
-
|
|
87
|
-
### Added feature "associations as direct calculated element values"
|
|
88
|
-
|
|
89
|
-
This beta feature does not require a flag. It is now possible to use associations with
|
|
90
|
-
filters as direct values of calculated elements (on-read), e.g. `calc = assoc[ID = 1]`.
|
|
91
|
-
|
|
92
|
-
## Version 4.3.0 - 2023-09-29
|
|
93
|
-
|
|
94
|
-
### Removed `associationDefault`
|
|
95
|
-
|
|
96
|
-
This flag is now the default. Managed associations with exactly one foreign key can now
|
|
97
|
-
have a default value.
|
|
98
|
-
|
|
99
|
-
## Version 4.1.0 - 2023-07-28
|
|
100
|
-
|
|
101
|
-
### Added `associationDefault`
|
|
102
|
-
|
|
103
|
-
With this beta flag enabled, managed associations with exactly one foreign key can now
|
|
104
|
-
have a default value.
|
|
105
|
-
|
|
106
|
-
### Removed `aspectWithoutElements`
|
|
107
|
-
|
|
108
|
-
Aspects without elements can now be defined without beta flag, e.g. `aspect A;`.
|
|
109
|
-
|
|
110
|
-
## Version 4.0.0 - 2023-06-06
|
|
111
|
-
|
|
112
|
-
### Removed `v4preview`
|
|
113
|
-
|
|
114
|
-
`v4preview` is now the default.
|
|
115
|
-
|
|
116
|
-
### Removed `calculatedElementsOnWrite`
|
|
117
|
-
|
|
118
|
-
It is now enabled by default. The feature is still "beta".
|
|
119
|
-
|
|
120
|
-
### Removed `ignoreAssocPublishingInUnion`
|
|
121
|
-
|
|
122
|
-
The behavior is now the default. If you still want to get an error message for
|
|
123
|
-
ignored published associations in unions, you can change the severity of message
|
|
124
|
-
`query-ignoring-assoc-in-union` to an error via `options.severities`.
|
|
125
|
-
|
|
126
|
-
## Version 3.9.2 - 2023-04-27
|
|
127
|
-
|
|
128
|
-
### Removed `odataOpenType`
|
|
129
|
-
|
|
130
|
-
This feature is now set to production mode.
|
|
131
|
-
|
|
132
|
-
## Version 3.9.0 - 2023-04-20
|
|
133
|
-
|
|
134
|
-
### Added `calculatedElementsOnWrite`
|
|
135
|
-
|
|
136
|
-
Allows to define calculated elements "on-write" in entities and aspects.
|
|
137
|
-
For example:
|
|
138
|
-
|
|
139
|
-
```cds
|
|
140
|
-
entity E { one: Integer; two = one + 1 stored; };
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
When a row is added to `E`, column `two` will be set automatically
|
|
144
|
-
in databases supporting generated columns.
|
|
145
|
-
|
|
146
|
-
## Version 3.8.0 - 2023-03-27
|
|
147
|
-
|
|
148
|
-
### Added `v4preview`
|
|
149
|
-
|
|
150
|
-
This beta flags tries to imitate cds-compiler v4 behavior.
|
|
151
|
-
This includes new compiler messages as well as potentially breaking changes.
|
|
152
|
-
|
|
153
|
-
Enable this beta flag to ease upgrading to cds-compiler v4.
|
|
154
|
-
|
|
155
|
-
This flag does not guarantee full compatibility with v4, but only
|
|
156
|
-
helps to identify potential issues as soon as possible.
|
|
157
|
-
|
|
158
|
-
### Removed `calculatedElements`
|
|
159
|
-
|
|
160
|
-
Now enabled per default.
|
|
161
|
-
|
|
162
|
-
## Version 3.7.0 - 2023-02-22
|
|
163
|
-
|
|
164
|
-
### Added `annotationExpressions`
|
|
165
|
-
|
|
166
|
-
This option allows to use expressions as annotation values, e.g.
|
|
167
|
-
`@anno: (1+2)`.
|
|
168
|
-
|
|
169
|
-
### Added `calculatedElements`
|
|
170
|
-
|
|
171
|
-
Allows to define calculated elements in entities and aspects. When used in views, they
|
|
172
|
-
are replaced by their value, for example:
|
|
173
|
-
|
|
174
|
-
```cds
|
|
175
|
-
entity E { one: Integer; two = one + 1; };
|
|
176
|
-
entity P as projection on E { two };
|
|
177
|
-
// P is the same as:
|
|
178
|
-
entity P as projection on E { one + 1 as two };
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
This allows to define calculations centrally at the entity, which can be used by
|
|
182
|
-
other views.
|
|
183
|
-
|
|
184
|
-
## Version 3.5.0 - 2022-12-07
|
|
185
|
-
|
|
186
|
-
### Added `odataTerms`
|
|
187
|
-
|
|
188
|
-
Allows to introduce and use new `Edm.Term`s in an OData API
|
|
189
|
-
based on CDS annotations. Annotations must be service members,
|
|
190
|
-
they can't be autoexposed.
|
|
191
|
-
|
|
192
|
-
## Version 3.4.0 - 2022-10-26
|
|
193
|
-
|
|
194
|
-
### Added `aspectWithoutElements`
|
|
195
|
-
|
|
196
|
-
- Aspects can now be defined without elements, e.g. `aspect A;`. This allows the definition of annotation-only aspects.
|
|
197
|
-
Views can be extended by such an aspect. For example:
|
|
198
|
-
```cds
|
|
199
|
-
entity V as projection on SomeEntity;
|
|
200
|
-
@anno aspect A;
|
|
201
|
-
extend V with A;
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
### Added `sqlMigration`
|
|
205
|
-
|
|
206
|
-
- to.sql.migration: Offer something similar to to.hdi.migration, but for general SQL. Don't offer a complete out-of-the-box schema evolution, instead only
|
|
207
|
-
allow lossless, easy to revert actions like adding a column or extending a string length.
|
|
208
|
-
|
|
209
|
-
## Version 3.3.0 - 2022-09-29
|
|
210
|
-
|
|
211
|
-
### Removed `nestedProjections`
|
|
212
|
-
|
|
213
|
-
- This is now the default - see CHANGELOG entry for 3.3.0.
|
|
214
|
-
|
|
215
|
-
### Fixed `nestedProjections`
|
|
216
|
-
|
|
217
|
-
- Issue an error for an unexpected `as ‹alias›` for references with `inline`;
|
|
218
|
-
people likely have confused `inline` with `expand`.
|
|
219
|
-
- Resolving references in the user-provided `on` condition of projected or newly-defined
|
|
220
|
-
associations inside `expand` and `inline` now works correctly.
|
|
221
|
-
- Correct `key` propagation for references with `expand` or `inline`.
|
|
222
|
-
- If an element is projected with sibling `expand`, the original data structure is usually
|
|
223
|
-
_not preserved_ (why use an `expand` if it is?). Therefore, the compiler cannot auto-rewrite
|
|
224
|
-
the `on` condition of unmanaged associations if such an element is referred to in the original
|
|
225
|
-
`on` condition. In that case, provide your own via `…: redirected to … on ‹condition›`.
|
|
226
|
-
|
|
227
|
-
## Version 3.1.0 - 2022-08-04
|
|
228
|
-
|
|
229
|
-
### Added `optionalActionFunctionParameters`
|
|
230
|
-
|
|
231
|
-
- to.edm(x): Annotate optional function/action parameters with `@Core.OptionalParameter` for OData V4.
|
|
232
|
-
An action/function parameter is optional if
|
|
233
|
-
1) it is already annotated with `@Core.OptionalParameter` regardless of its definition.
|
|
234
|
-
2) it has a default value (including null), regardless of it's nullability
|
|
235
|
-
3) it has NO default value but is nullable (the implicit default value is null)
|
|
236
|
-
|
|
237
|
-
If a mandatory parameter (not null and no default value) appears after an optional
|
|
238
|
-
parameter, a warning is raised, Core.OptionalParameter requires that all optional
|
|
239
|
-
parameters appear rightmost.
|
|
240
|
-
|
|
241
|
-
### Added `odataOpenType`
|
|
242
|
-
|
|
243
|
-
- to.edm(x): Support annotation `@open` on entity and structured type level to declare the
|
|
244
|
-
corresponding entity/complex type to be `OpenType=true`. If an open structured type is declared
|
|
245
|
-
closed (with a falsy annotation value), the corresponding EDM type is closed as well and suffixed
|
|
246
|
-
with `_closed` (or `_open` vice versa).
|
|
247
|
-
No further checks are performed on possibly open foreign or primary key types nor on eventually
|
|
248
|
-
bucket elements to store the additional data.
|
|
249
|
-
|
|
250
|
-
## Version 3.0.0 - 2022-06-23
|
|
251
|
-
|
|
252
|
-
### Removed `addTextsLanguageAssoc`
|
|
253
|
-
|
|
254
|
-
Instead, use the option `addTextsLanguageAssoc`, which is available since v2.8.0.
|
|
255
|
-
|
|
256
|
-
## Version 2.12.0 - 2022-01-25
|
|
257
|
-
|
|
258
|
-
### Added `sqlSnippets`
|
|
259
|
-
|
|
260
|
-
- to.sql/hdi/hdbcds: Introduce the annotations `@sql.prepend` and `@sql.append` that allow inserting user-written SQL snippets into the compiler generated content.
|
|
261
|
-
|
|
262
|
-
## Version 2.11.0 - 2021-12-02
|
|
263
|
-
|
|
264
|
-
### Removed `foreignKeyConstraints`
|
|
265
|
-
|
|
266
|
-
## Version 2.10.4 - 2021-11-05
|
|
267
|
-
|
|
268
|
-
### Fixed `nestedProjections`
|
|
269
|
-
|
|
270
|
-
- to.sql/hdi/hdbcds: Correctly handle a `*` at the not-first place in the query
|
|
271
|
-
|
|
272
|
-
## Version 2.6.0 - 2021-08-23
|
|
273
|
-
|
|
274
|
-
### Removed `pretransformedCSN`
|
|
275
|
-
|
|
276
|
-
### Removed `renderSql`
|
|
277
|
-
|
|
278
|
-
### Removed `keylessManagedAssoc`
|
|
279
|
-
|
|
280
|
-
This is now the default - see CHANGELOG entry for 2.6.0
|
|
281
|
-
|
|
282
|
-
### Fixed `nestedProjections`
|
|
283
|
-
|
|
284
|
-
- to.sql/hdi/hdbcds: now work correctly when nested projections are used
|
|
285
|
-
|
|
286
|
-
### Fixed `foreignKeyConstraints`
|
|
287
|
-
|
|
288
|
-
- Always use the name of the association / backlink compared to
|
|
289
|
-
`$self` as name suffix for a constraint
|
|
290
|
-
- Composition of one always result in:
|
|
291
|
-
+ ON DELETE RESTRICT
|
|
292
|
-
+ ON UPDATE RESTRICT
|
|
293
|
-
- Composition of one w/o backlink will result in a constraint in
|
|
294
|
-
the entity where the composition is defined
|
|
295
|
-
|
|
296
|
-
## Version 2.4.4 - 2021-07-02
|
|
297
|
-
|
|
298
|
-
### Added `nestedProjections`
|
|
299
|
-
|
|
300
|
-
- Support `expand`: columns can look like `assoc_or_struct_or_tabalias { col_expression1, … }`,
|
|
301
|
-
`longer.ref as name { *, … } excluding { … }`, `{ col_expression1 as sub1, … } as name`, etc.
|
|
302
|
-
- Support `inline`: columns can look like `assoc_or_struct_or_tabalias.{ col_expression1, … }`,
|
|
303
|
-
`longer.ref[filter = condition].{ *, … } excluding { … }`, `assoc_or_struct_or_tabalias.*`, etc.
|
|
304
|
-
- _Some checks are missing and will be added! Minor changes might occur._
|
|
305
|
-
- **The SQL backends might not work properly yet if nested projections are used!**
|
|
306
|
-
|
|
307
|
-
## Version 2.4.2 - 2021-07-01
|
|
308
|
-
|
|
309
|
-
### Added `keylessManagedAssoc`
|
|
310
|
-
|
|
311
|
-
- Support managed associations without foreign keys. Associations targeting a definition without primary keys or with an
|
|
312
|
-
explicit empty foreign key tuple or with empty structured elements as foreign keys and their corresponding `$self`
|
|
313
|
-
comparisons do not describe the relationship between the source and the target entity.
|
|
314
|
-
These associations can be used to establish API navigations but cannot be used to access elements in the target
|
|
315
|
-
entity as they cannot be transformed into a valid JOIN expression.
|
|
316
|
-
Consequently, these associations are not added to the `WITH ASSOCIATIONS` clause or forwarded to HANA CDS.
|
|
317
|
-
Managed Associations without foreign keys must be enabled with `--beta: keylessManagedAssoc`
|
|
318
|
-
|
|
319
|
-
## Version 2.4.0 - 2021-06-28
|
|
320
|
-
|
|
321
|
-
### Changed `foreignKeyConstraints`
|
|
322
|
-
|
|
323
|
-
- `toSql`/`toHdbcds`: omit constraint generation if the option `skipDbConstraints` is set
|
|
324
|
-
- If the database constraints are switched off by the global option,
|
|
325
|
-
render constraints nevertheless if an association / composition
|
|
326
|
-
is annotated with `@cds.persistence.assert.integrity: true`
|
|
327
|
-
- omit constraint generation if an association / composition
|
|
328
|
-
is annotated with `@cds.persistence.assert.integrity: false`
|
|
329
|
-
-> for managed compositions, the `up_` link in the compositions target entity
|
|
330
|
-
will not result in a constraint if the composition is annotated as described
|
|
331
|
-
|
|
332
|
-
## Version 2.0.8
|
|
333
|
-
|
|
334
|
-
### Added `foreignKeyConstraints`
|
|
335
|
-
|
|
336
|
-
to.sql/to.hdi: If the beta option `foreignKeyConstraints` is supplied,
|
|
337
|
-
referential constraints are generated for compliant associations and compositions.
|
|
338
|
-
|
|
339
|
-
## Version 2.0.2
|
|
340
|
-
|
|
341
|
-
### Removed `dontRenderVirtualElements`
|
|
342
|
-
|
|
343
|
-
Virtual elements are no longer rendered in views as `null as <id>` or
|
|
344
|
-
added to potentially generated draft tables. This behavior can be turned off
|
|
345
|
-
with deprecated option `renderVirtualElements` for backward compatibility.
|
|
346
|
-
|
|
347
|
-
### Removed `originalKeysForTemporal`
|
|
348
|
-
|
|
349
|
-
### Removed `odataDefaultValues`
|
|
350
|
-
|
|
351
|
-
OData: Default values for EntityType properties are rendered always.
|
|
352
|
-
|
|
353
|
-
### Removed `subElemRedirections`
|
|
354
|
-
|
|
355
|
-
This option is now enabled by default.
|
|
356
|
-
|
|
357
|
-
### Removed `keyRefError`
|
|
358
|
-
|
|
359
|
-
## Version 1.44.0
|
|
360
|
-
|
|
361
|
-
### Added `addTextsLanguageAssoc`
|
|
362
|
-
|
|
363
|
-
When the beta option `addTextsLanguageAssoc` is set to true and
|
|
364
|
-
the model contains an entity `sap.common.Languages` with an element `code`,
|
|
365
|
-
all generated texts entities additionally contain an element `language`
|
|
366
|
-
which is an association to `sap.common.Languages` using element `locale`.
|
|
367
|
-
|
|
368
|
-
## Version 1.43.0
|
|
369
|
-
|
|
370
|
-
### Changed `subElemRedirections`
|
|
371
|
-
|
|
372
|
-
When the beta option `subElemRedirections` is set to true,
|
|
373
|
-
_all_ array (new!) and structure types are expanded when referenced:
|
|
374
|
-
managed associations (and compositions to entities) in that array are
|
|
375
|
-
implicitly redirected when necessary.
|
|
376
|
-
See [below for details](#version-1300---2020-06-12).
|
|
377
|
-
|
|
378
|
-
Nested array types (without intermediate structure types) are not supported.
|
|
379
|
-
|
|
380
|
-
### Added `ignoreAssocPublishingInUnion`
|
|
381
|
-
|
|
382
|
-
For `to.hdbcds`, with beta flag `ignoreAssocPublishingInUnion` in conjunction with dialect
|
|
383
|
-
`hanaJoins`, unmanaged associations in UNIONs are silently ignored and managed associations
|
|
384
|
-
are replaced by their foreign keys and silently ignored
|
|
385
|
-
|
|
386
|
-
## Version 1.36.0 - 2020-08-07
|
|
387
|
-
|
|
388
|
-
### Added `mapAssocToJoinCardinality`
|
|
389
|
-
|
|
390
|
-
Analog to the feature `cardinality for explicit joins`, the association to
|
|
391
|
-
join transformation algorithm now experimentally supports join cardinalities as well.
|
|
392
|
-
The default cardinality `MANY TO ONE` is added to the join node if no cardinality has
|
|
393
|
-
been specified.
|
|
394
|
-
|
|
395
|
-
### Added `odataDefaultValues`
|
|
396
|
-
|
|
397
|
-
OData: Enables the rendering of default values for EntityType properties.
|
|
398
|
-
|
|
399
|
-
### Added `originalKeysForTemporal`
|
|
400
|
-
|
|
401
|
-
OData: The original entity keys are not enhanced with `@cds.valid.from` or replaced with
|
|
402
|
-
`@cds.valid.key` elements. The `@Core.AlternateKeys` only mentions the `@cds.valid.key` element.
|
|
403
|
-
|
|
404
|
-
### Added `dontRenderVirtualElements`
|
|
405
|
-
|
|
406
|
-
Virtual elements are no longer rendered in views as `null as <id>` or added to potentially generated
|
|
407
|
-
draft tables. This behavior can be turned off with `renderVirtualElements` for backward compatibility.
|
|
408
|
-
|
|
409
|
-
### Removed `noJoinsForForeignKeys`
|
|
410
|
-
|
|
411
|
-
The association to join transformation treats foreign key accesses with priority now.
|
|
412
|
-
|
|
413
|
-
### Removed `uniqueconstraints`
|
|
414
|
-
|
|
415
|
-
Unique constraints are now generally available.
|
|
416
|
-
|
|
417
|
-
## Version 1.33.0 - 2020-08-24
|
|
418
|
-
|
|
419
|
-
### Added `hanaAssocRealCardinality`
|
|
420
|
-
|
|
421
|
-
Render JOIN cardinality in native HANA association if provided. If no cardinality has been specified.
|
|
422
|
-
|
|
423
|
-
## Version 1.32.0 - 2020-07-10
|
|
424
|
-
|
|
425
|
-
### Removed `aspectCompositions`
|
|
426
|
-
|
|
427
|
-
Aspect compositions aka managed compositions are now available without beta option.
|
|
428
|
-
_Warning_: the CSN representation can still change.
|
|
429
|
-
|
|
430
|
-
## Version 1.31.0 - 2020-06-26
|
|
431
|
-
|
|
432
|
-
### Changed `subElemRedirections`
|
|
433
|
-
|
|
434
|
-
Signal an error
|
|
435
|
-
if an unmanaged association as sub element is to be implicitly redirected,
|
|
436
|
-
as we do not automatically rewrite the `on` condition in that situation yet.
|
|
437
|
-
|
|
438
|
-
## Version 1.30.0 - 2020-06-12
|
|
439
|
-
|
|
440
|
-
### Added `subElemRedirections`
|
|
441
|
-
|
|
442
|
-
When the beta option `subElemRedirections` is set to true,
|
|
443
|
-
_all_ structure types are expanded when referenced:
|
|
444
|
-
|
|
445
|
-
- managed associations (and compositions to entities) are implicitly redirected
|
|
446
|
-
when necessary,
|
|
447
|
-
- sub elements of referred structure types can be annotated individually,
|
|
448
|
-
- the resulting CSN is bigger (will be reduced in the future if possible)
|
|
449
|
-
as `type` references to structures will now have a sibling `elements`.
|
|
450
|
-
|
|
451
|
-
This option does not enable:
|
|
452
|
-
|
|
453
|
-
- rewriting the `on` conditions of associations in sub elements,
|
|
454
|
-
- aspect compositions as sub elements,
|
|
455
|
-
- `localized` sub elements,
|
|
456
|
-
- `key` property on sub elements.
|
|
457
|
-
|
|
458
|
-
## Version 1.23.0
|
|
459
|
-
|
|
460
|
-
### Added `keyRefError`
|
|
461
|
-
|
|
462
|
-
Always signal an error (instead of just a warning in some cases),
|
|
463
|
-
if not all references in the `keys` of a managed associations
|
|
464
|
-
are projected in the new target.
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
# ChangeLog of deprecated features for CDS compiler and backends
|
|
2
|
-
|
|
3
|
-
<!-- markdownlint-disable MD024 -->
|
|
4
|
-
<!-- (no-duplicate-heading)-->
|
|
5
|
-
|
|
6
|
-
Note: `deprecated` features are listed in this ChangeLog just for information.
|
|
7
|
-
`deprecated` features will be removed after a certain grace period.
|
|
8
|
-
|
|
9
|
-
**Use `deprecated` features only transitional in productive mode.**
|
|
10
|
-
|
|
11
|
-
**When the `deprecated` option is set, the `beta` option is ignored,
|
|
12
|
-
and several new features are not available.**
|
|
13
|
-
|
|
14
|
-
## Version 6.0.8 - 2025-05-23
|
|
15
|
-
|
|
16
|
-
### Added `noQuasiVirtualAssocs`
|
|
17
|
-
|
|
18
|
-
If set, managed to-many associations will get foreign keys again.
|
|
19
|
-
In cds-compiler v6, managed to-many associations without explicit foreign keys
|
|
20
|
-
don't get `keys` anymore. This flag restores v5 behavior.
|
|
21
|
-
|
|
22
|
-
### Added `noCompositionIncludes`
|
|
23
|
-
|
|
24
|
-
If set, generated entities for composition-of-named-aspect will not
|
|
25
|
-
get an `includes` property.
|
|
26
|
-
|
|
27
|
-
### Added `noPersistenceJournalForGeneratedEntities`
|
|
28
|
-
|
|
29
|
-
If set, `@cds.persistence.journal` will _not_ be propagated to generated entities,
|
|
30
|
-
including generated `.texts` entities for localized entities, nor generated entities
|
|
31
|
-
for compositions-of-aspect.
|
|
32
|
-
|
|
33
|
-
In cds-compiler v6, this annotation is copied to `.texts` entities as well as
|
|
34
|
-
generated composition-of-aspect entities it by default.
|
|
35
|
-
|
|
36
|
-
### Removed `includesNonShadowedFirst`
|
|
37
|
-
|
|
38
|
-
### Removed `eagerPersistenceForGeneratedEntities`
|
|
39
|
-
|
|
40
|
-
### Removed `noKeyPropagationWithExpansions`
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
## Version 4.2.0 - 2023-08-29
|
|
44
|
-
|
|
45
|
-
### Added `noKeyPropagationWithExpansions`
|
|
46
|
-
|
|
47
|
-
When this option is set, element `id` in types `Orig` and `I` are keys,
|
|
48
|
-
but `id` in `D` is not.
|
|
49
|
-
|
|
50
|
-
```cds
|
|
51
|
-
type Orig { key id: Integer };
|
|
52
|
-
type I: Orig {};
|
|
53
|
-
type D: Orig;
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
When this option is not set, element `id` in all three types are keys.
|
|
57
|
-
|
|
58
|
-
## Version 4.0.0 - 2023-06-06
|
|
59
|
-
|
|
60
|
-
### Added `downgradableErrors`
|
|
61
|
-
|
|
62
|
-
Allow to change the severity of some errors which are meant to stay errors in v4.
|
|
63
|
-
|
|
64
|
-
### Added `includesNonShadowedFirst`
|
|
65
|
-
|
|
66
|
-
Use this flag to keep adding elements from included definitions first, example:
|
|
67
|
-
|
|
68
|
-
```cds
|
|
69
|
-
entity A { one: Integer; two: String(10); three: Integer; }
|
|
70
|
-
entity E : A { two: String(12); }
|
|
71
|
-
// v3: one, three, two
|
|
72
|
-
// v4: one, two, three
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### Added `ignoreSpecifiedQueryElements`
|
|
76
|
-
|
|
77
|
-
Use this flag if you want to ignore a query's `elements`, except for annotations and doc comments.
|
|
78
|
-
cds-compiler v3 and earlier simply ignored a query element except for its annotations.
|
|
79
|
-
cds-compiler v4 resolves the element's type.
|
|
80
|
-
|
|
81
|
-
### Removed `autoCorrectOrderBySourceRefs`
|
|
82
|
-
|
|
83
|
-
Instead of this deprecated flag, you can downgrade error message `ref-deprecated-orderby`.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
## Version 3.1.0 - 2022-08-04
|
|
87
|
-
|
|
88
|
-
### Added `autoCorrectOrderBySourceRefs`
|
|
89
|
-
|
|
90
|
-
When this option is set, calling `compile` autocorrects direct `order by`
|
|
91
|
-
source element references without table alias for SELECT queries by adding the
|
|
92
|
-
table alias to the `ref`.
|
|
93
|
-
|
|
94
|
-
Using this option might lead to surprising results when elements are added to
|
|
95
|
-
existing models: `order by` specifications might change their semantics without
|
|
96
|
-
any extra messages.
|
|
97
|
-
|
|
98
|
-
## Version 3.0.0 - 2022-06-23
|
|
99
|
-
|
|
100
|
-
Version 3 of the cds-compiler removes all v2 deprecated flags.
|
|
101
|
-
|
|
102
|
-
### Add `eagerPersistenceForGeneratedEntities`
|
|
103
|
-
|
|
104
|
-
If enabled, the old behavior regarding `@cds.persistence.skip` and `@cds.persistence.exists`
|
|
105
|
-
is restored, i.e. these annotations are not copied from parent to generated child entities, nor
|
|
106
|
-
is `@cds.persistence.exists` copied to localized convenience views.
|
|
107
|
-
|
|
108
|
-
### Removed `createLocalizedViews`
|
|
109
|
-
|
|
110
|
-
### Removed `downgradableErrors`
|
|
111
|
-
|
|
112
|
-
### Removed `generatedEntityNameWithUnderscore`
|
|
113
|
-
|
|
114
|
-
### Removed `longAutoexposed`
|
|
115
|
-
|
|
116
|
-
### Removed `noElementsExpansion`
|
|
117
|
-
|
|
118
|
-
<!-- fully removed with 3.1.0 -->
|
|
119
|
-
|
|
120
|
-
### Removed `noInheritedAutoexposeViaComposition`
|
|
121
|
-
|
|
122
|
-
### Removed `noScopedRedirections`
|
|
123
|
-
|
|
124
|
-
### Removed `oldVirtualNotNullPropagation`
|
|
125
|
-
|
|
126
|
-
### Removed `parensAsStrings`
|
|
127
|
-
|
|
128
|
-
<!-- fully removed with 3.5.0 -->
|
|
129
|
-
|
|
130
|
-
### Removed `projectionAsQuery`
|
|
131
|
-
|
|
132
|
-
### Removed `redirectInSubQueries`
|
|
133
|
-
|
|
134
|
-
### Removed `renderVirtualElements`
|
|
135
|
-
|
|
136
|
-
### Removed `shortAutoexposed`
|
|
137
|
-
|
|
138
|
-
### Removed `unmanagedUpInComponent`
|
|
139
|
-
|
|
140
|
-
### Removed `v1KeysForTemporal`
|
|
141
|
-
|
|
142
|
-
## Version 2.13.0 - 2022-03-22
|
|
143
|
-
|
|
144
|
-
### Added `redirectInSubQueries`
|
|
145
|
-
|
|
146
|
-
When this option is set, we auto-redirect associations and composition also in
|
|
147
|
-
non-main queries, sometimes without rewriting the `keys`/`on` (there will be no
|
|
148
|
-
fix for this).
|
|
149
|
-
|
|
150
|
-
### Added `oldVirtualNotNullPropagation`
|
|
151
|
-
|
|
152
|
-
When this option is set, we do not propagate `notNull` along types.
|
|
153
|
-
Additionally, we propagate `notNull` and `virtual` from a query source element
|
|
154
|
-
to the sub elements of a query entity element, even if the property is not
|
|
155
|
-
propagated to the query entity element itself (like with type references).
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
## Version 2.2.0
|
|
159
|
-
|
|
160
|
-
### Added `noScopedRedirections`
|
|
161
|
-
|
|
162
|
-
When this option is set, the definition scope is not taken into account when
|
|
163
|
-
trying to find an implicit redirection target. Setting the following
|
|
164
|
-
deprecated options also switches off scoped redirections (additionally to their
|
|
165
|
-
other effect): `noElementsExpansion`, `generatedEntityNameWithUnderscore`,
|
|
166
|
-
`shortAutoexposed`, `longAutoexposed`, `noInheritedAutoexposeViaComposition`.
|
|
167
|
-
|
|
168
|
-
### Added `noInheritedAutoexposeViaComposition`
|
|
169
|
-
|
|
170
|
-
When this option is set, only entities directly specified after `Composition of` are
|
|
171
|
-
auto-exposed, not entities used as target via explicit or implicit `redirected to`.
|
|
172
|
-
|
|
173
|
-
## Version 2.0.16
|
|
174
|
-
|
|
175
|
-
### Added `downgradableErrors`
|
|
176
|
-
|
|
177
|
-
Allow to change the severity of some errors which should stay to be an error.
|
|
178
|
-
|
|
179
|
-
### Added `shortAutoexposed`
|
|
180
|
-
|
|
181
|
-
When this option is set (and `generatedEntityNameWithUnderscore`), the names of
|
|
182
|
-
autoexposed entities are calculated according to the default compiler v1
|
|
183
|
-
behavior (without v1 options `dependentAutoexposed` and `longAutoexposed`).
|
|
184
|
-
|
|
185
|
-
## Version 2.0.10
|
|
186
|
-
|
|
187
|
-
### Added `longAutoexposed`
|
|
188
|
-
|
|
189
|
-
When this option is set (and `generatedEntityNameWithUnderscore`),
|
|
190
|
-
the names of auto-exposed entities are calculated according to the
|
|
191
|
-
compiler v1 option `longAutoexposed`.
|
|
192
|
-
|
|
193
|
-
### Added `generatedEntityNameWithUnderscore`
|
|
194
|
-
|
|
195
|
-
Keep using `_` is separator for generated auto-exposed entities and for entities
|
|
196
|
-
created for managed compositions. It also disables a definition `A.B.C` if `A`
|
|
197
|
-
or `A.B` is a definition other than a context or service (v1 behavior).
|
|
198
|
-
|
|
199
|
-
## Version 2.0.4-ms1
|
|
200
|
-
|
|
201
|
-
### Added `createLocalizedViews`
|
|
202
|
-
|
|
203
|
-
Add localized convenience views in `for.odata`.
|
|
204
|
-
|
|
205
|
-
### Added `unmanagedUpInComponent`
|
|
206
|
-
|
|
207
|
-
Render association `up_` in composition component unmanaged.
|
|
208
|
-
|
|
209
|
-
## Version 2.0.2-ms1
|
|
210
|
-
|
|
211
|
-
### Added `renderVirtualElements`
|
|
212
|
-
|
|
213
|
-
Virtual elements are no longer rendered in views as `null as <id>` or added to potentially generated
|
|
214
|
-
draft tables. This behavior can be turned off with `renderVirtualElements` for backward compatibility.
|
|
215
|
-
|
|
216
|
-
### Added `parensAsStrings`
|
|
217
|
-
|
|
218
|
-
Represent parentheses in expressions with `'('` and `')'` in `xpr` arrays
|
|
219
|
-
instead of using nested `xpr`s or `list`.
|
|
220
|
-
|
|
221
|
-
### Added `v1KeysForTemporal`
|
|
222
|
-
|
|
223
|
-
Render old and broken temporal EDM API.
|
|
224
|
-
|
|
225
|
-
### Added `noElementsExpansion`
|
|
226
|
-
|
|
227
|
-
When setting it, association in sub elements are not automatically redirected,
|
|
228
|
-
and the sub elements cannot be annotated individually.
|
|
229
|
-
|
|
230
|
-
Do not use this. Setting it might avoid some compile errors,
|
|
231
|
-
but in most cases the reported errors are rightly reported.
|
|
232
|
-
|
|
233
|
-
### Added `projectionAsQuery`
|
|
234
|
-
|
|
235
|
-
Render `projection` as `query` in CSN.
|