@sap/cds 5.8.4 → 5.9.0
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 +174 -77
- package/app/fiori/preview.js +16 -11
- package/app/index.js +1 -1
- package/bin/build/buildTaskFactory.js +3 -3
- package/bin/build/buildTaskProviderFactory.js +1 -1
- package/bin/build/constants.js +1 -1
- package/bin/build/provider/buildTaskHandlerEdmx.js +12 -7
- package/bin/build/provider/buildTaskHandlerInternal.js +1 -1
- package/bin/build/provider/buildTaskProviderInternal.js +8 -2
- package/bin/build/provider/hana/2migration.js +27 -24
- package/bin/build/provider/hana/index.js +17 -18
- package/bin/build/provider/hana/migrationtable.js +9 -10
- package/bin/build/provider/java-cf/index.js +4 -5
- package/bin/build/provider/node-cf/index.js +99 -6
- package/bin/cds.js +17 -18
- package/bin/deploy/to-hana/cfUtil.js +16 -19
- package/bin/deploy/to-hana/hana.js +7 -24
- package/bin/deploy/to-hana/hdiDeployUtil.js +8 -4
- package/bin/mtx/in-cds.js +2 -2
- package/bin/serve.js +10 -3
- package/bin/utils/modules.js +7 -0
- package/bin/version.js +56 -3
- package/lib/compile/cdsc.js +26 -3
- package/lib/compile/etc/_localized.js +36 -25
- package/lib/compile/etc/csv.js +8 -8
- package/lib/compile/for/drafts.js +9 -0
- package/lib/compile/for/java.js +16 -0
- package/lib/compile/for/nodejs.js +12 -0
- package/lib/compile/for/odata.js +1 -1
- package/lib/compile/index.js +3 -0
- package/lib/compile/minify.js +16 -2
- package/lib/compile/parse.js +2 -2
- package/lib/compile/resolve.js +35 -18
- package/lib/compile/to/json.js +3 -1
- package/lib/compile/to/sql.js +2 -2
- package/lib/compile/to/srvinfo.js +4 -2
- package/lib/connect/index.js +1 -1
- package/lib/core/entities.js +15 -14
- package/lib/core/index.js +39 -36
- package/lib/core/reflect.js +4 -2
- package/lib/deploy.js +114 -127
- package/lib/env/defaults.js +1 -0
- package/lib/env/index.js +165 -165
- package/lib/env/presets.js +1 -0
- package/lib/env/requires.js +120 -49
- package/lib/index.js +1 -0
- package/lib/log/format/kibana.js +2 -2
- package/lib/ql/SELECT.js +10 -0
- package/lib/ql/parse.js +1 -0
- package/lib/req/cds-context.js +4 -1
- package/lib/req/context.js +50 -56
- package/lib/req/event.js +1 -6
- package/lib/req/locale.js +6 -5
- package/lib/req/request.js +2 -0
- package/lib/req/user.js +7 -5
- package/lib/serve/Service-api.js +10 -7
- package/lib/serve/Service-dispatch.js +9 -11
- package/lib/serve/Service-methods.js +30 -41
- package/lib/serve/Transaction.js +10 -7
- package/lib/serve/adapters.js +7 -5
- package/lib/serve/index.js +24 -12
- package/lib/utils/data.js +1 -1
- package/lib/utils/index.js +27 -30
- package/lib/utils/resources/index.js +101 -0
- package/lib/utils/resources/tar.js +71 -0
- package/lib/utils/resources/utils.js +11 -0
- package/libx/_runtime/audit/Service.js +36 -39
- package/libx/_runtime/audit/generic/personal/access.js +3 -4
- package/libx/_runtime/audit/generic/personal/modification.js +3 -4
- package/libx/_runtime/audit/utils/v2.js +1 -2
- package/libx/_runtime/auth/index.js +126 -84
- package/libx/_runtime/auth/strategies/JWT.js +12 -19
- package/libx/_runtime/auth/strategies/dummy.js +1 -5
- package/libx/_runtime/auth/strategies/dwc.js +11 -9
- package/libx/_runtime/auth/strategies/mock.js +0 -4
- package/libx/_runtime/auth/strategies/{utils/xssec.js → xssecUtils.js} +7 -4
- package/libx/_runtime/auth/strategies/xsuaa.js +12 -19
- package/libx/_runtime/auth/utils.js +22 -1
- package/libx/_runtime/cds-services/adapter/odata-v4/Dispatcher.js +104 -98
- package/libx/_runtime/cds-services/adapter/odata-v4/OData.js +2 -2
- package/libx/_runtime/cds-services/adapter/odata-v4/ODataRequest.js +1 -1
- package/libx/_runtime/cds-services/adapter/odata-v4/handlers/action.js +1 -1
- package/libx/_runtime/cds-services/adapter/odata-v4/handlers/language.js +2 -8
- package/libx/_runtime/cds-services/adapter/odata-v4/handlers/metadata.js +4 -29
- package/libx/_runtime/cds-services/adapter/odata-v4/handlers/read.js +2 -1
- package/libx/_runtime/cds-services/adapter/odata-v4/handlers/request.js +3 -2
- package/libx/_runtime/cds-services/adapter/odata-v4/handlers/update.js +2 -2
- package/libx/_runtime/cds-services/adapter/odata-v4/odata-to-cqn/ExpressionToCQN.js +4 -6
- package/libx/_runtime/cds-services/adapter/odata-v4/odata-to-cqn/expandToCQN.js +24 -21
- package/libx/_runtime/cds-services/adapter/odata-v4/odata-to-cqn/index.js +8 -2
- package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/deserializer/DeserializerFactory.js +2 -0
- package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/DispatcherCommand.js +2 -6
- package/libx/_runtime/cds-services/adapter/odata-v4/to.js +1 -12
- package/libx/_runtime/cds-services/adapter/odata-v4/utils/data.js +33 -9
- package/libx/_runtime/cds-services/adapter/odata-v4/utils/dispatcherUtils.js +50 -0
- package/libx/_runtime/cds-services/adapter/odata-v4/utils/readAfterWrite.js +2 -2
- package/libx/_runtime/cds-services/adapter/odata-v4/utils/request.js +10 -3
- package/libx/_runtime/cds-services/adapter/odata-v4/utils/result.js +9 -11
- package/libx/_runtime/cds-services/adapter/rest/RestRequest.js +6 -3
- package/libx/_runtime/cds-services/adapter/rest/handlers/operation.js +4 -2
- package/libx/_runtime/cds-services/adapter/rest/rest-to-cqn/utils.js +1 -1
- package/libx/_runtime/cds-services/adapter/rest/utils/binary.js +1 -1
- package/libx/_runtime/cds-services/adapter/rest/utils/key-value-utils.js +2 -3
- package/libx/_runtime/cds-services/adapter/rest/utils/parse-url.js +6 -4
- package/libx/_runtime/cds-services/adapter/rest/utils/result.js +1 -0
- package/libx/_runtime/cds-services/adapter/rest/utils/validation-checks.js +8 -5
- package/libx/_runtime/cds-services/services/Service.js +40 -0
- package/libx/_runtime/cds-services/services/utils/columns.js +4 -3
- package/libx/_runtime/cds-services/services/utils/compareJson.js +4 -4
- package/libx/_runtime/cds-services/services/utils/differ.js +3 -3
- package/libx/_runtime/cds-services/services/utils/handlerUtils.js +4 -4
- package/libx/_runtime/cds-services/services/utils/restrictions.js +78 -0
- package/libx/_runtime/cds-services/util/assert.js +20 -14
- package/libx/_runtime/cds.js +9 -1
- package/libx/_runtime/common/aspects/any.js +5 -0
- package/libx/_runtime/common/aspects/entity.js +25 -7
- package/libx/_runtime/common/aspects/utils.js +2 -2
- package/libx/_runtime/common/composition/data.js +6 -0
- package/libx/_runtime/common/composition/insert.js +3 -2
- package/libx/_runtime/common/composition/tree.js +4 -10
- package/libx/_runtime/common/composition/update.js +4 -4
- package/libx/_runtime/common/constants/draft.js +29 -26
- package/libx/_runtime/common/error/constants.js +2 -2
- package/libx/_runtime/common/error/frontend.js +7 -15
- package/libx/_runtime/common/generic/auth/capabilities.js +59 -0
- package/libx/_runtime/common/generic/auth/constants.js +20 -0
- package/libx/_runtime/common/generic/auth/expand.js +54 -0
- package/libx/_runtime/common/generic/auth/index.js +32 -0
- package/libx/_runtime/common/generic/auth/insertOnly.js +15 -0
- package/libx/_runtime/common/generic/auth/readOnly.js +26 -0
- package/libx/_runtime/common/generic/auth/requires.js +34 -0
- package/libx/_runtime/common/generic/auth/restrict.js +296 -0
- package/libx/_runtime/common/generic/auth/utils.js +213 -0
- package/libx/_runtime/common/generic/crud.js +8 -6
- package/libx/_runtime/common/generic/etag.js +1 -1
- package/libx/_runtime/common/generic/input.js +35 -35
- package/libx/_runtime/common/generic/sorting.js +2 -3
- package/libx/_runtime/common/generic/temporal.js +2 -2
- package/libx/_runtime/common/i18n/messages.properties +1 -1
- package/libx/_runtime/common/toggles/handler.js +21 -0
- package/libx/_runtime/common/utils/copy.js +10 -1
- package/libx/_runtime/common/utils/cqn2cqn4sql.js +100 -29
- package/libx/_runtime/common/utils/csn.js +63 -1
- package/libx/_runtime/common/utils/dollar.js +10 -1
- package/libx/_runtime/common/utils/draft.js +46 -7
- package/libx/_runtime/common/utils/entityFromCqn.js +13 -9
- package/libx/_runtime/common/utils/extensibilityUtils.js +18 -0
- package/libx/_runtime/common/utils/foreignKeyPropagations.js +88 -104
- package/libx/_runtime/common/utils/generateOnCond.js +4 -1
- package/libx/_runtime/common/utils/quotingStyles.js +2 -0
- package/libx/_runtime/common/utils/resolveStructured.js +25 -9
- package/libx/_runtime/common/utils/resolveView.js +4 -1
- package/libx/_runtime/common/utils/rewriteAsterisks.js +3 -16
- package/libx/_runtime/common/utils/structured.js +33 -37
- package/libx/_runtime/common/utils/template.js +17 -8
- package/libx/_runtime/common/utils/templateProcessor.js +28 -28
- package/libx/_runtime/db/data-conversion/post-processing.js +118 -417
- package/libx/_runtime/db/expand/expandCQNToJoin.js +45 -41
- package/libx/_runtime/db/expand/rawToExpanded.js +29 -8
- package/libx/_runtime/db/generic/index.js +1 -3
- package/libx/_runtime/db/generic/input.js +5 -10
- package/libx/_runtime/db/generic/rewrite.js +5 -2
- package/libx/_runtime/db/generic/structured.js +2 -2
- package/libx/_runtime/db/query/delete.js +2 -2
- package/libx/_runtime/db/query/insert.js +1 -1
- package/libx/_runtime/db/query/update.js +9 -14
- package/libx/_runtime/db/sql-builder/CreateBuilder.js +4 -3
- package/libx/_runtime/db/sql-builder/InsertBuilder.js +14 -1
- package/libx/_runtime/db/sql-builder/SelectBuilder.js +3 -2
- package/libx/_runtime/db/sql-builder/dataTypes.js +3 -3
- package/libx/_runtime/db/utils/columns.js +3 -3
- package/libx/_runtime/db/utils/normalizeTimeData.js +2 -2
- package/libx/_runtime/db/utils/propagateForeignKeys.js +6 -2
- package/libx/_runtime/extensibility/mps/index.js +5 -0
- package/libx/_runtime/extensibility/mps/service.js +111 -0
- package/libx/_runtime/extensibility/mps/tar.js +42 -0
- package/libx/_runtime/extensibility/mps/utils.js +11 -0
- package/libx/_runtime/{fiori → extensibility}/uiflex/handler/transformREAD.js +0 -0
- package/libx/_runtime/{fiori → extensibility}/uiflex/handler/transformRESULT.js +17 -5
- package/libx/_runtime/{fiori → extensibility}/uiflex/handler/transformWRITE.js +1 -0
- package/libx/_runtime/extensibility/uiflex/index.js +54 -0
- package/libx/_runtime/extensibility/uiflex/service.js +276 -0
- package/libx/_runtime/{fiori → extensibility}/uiflex/utils.js +22 -7
- package/libx/_runtime/fiori/generic/activate.js +2 -2
- package/libx/_runtime/fiori/generic/before.js +4 -4
- package/libx/_runtime/fiori/generic/new.js +3 -3
- package/libx/_runtime/fiori/generic/patch.js +1 -1
- package/libx/_runtime/fiori/generic/read.js +58 -66
- package/libx/_runtime/fiori/generic/readOverDraft.js +71 -16
- package/libx/_runtime/fiori/utils/handler.js +6 -13
- package/libx/_runtime/fiori/utils/where.js +6 -5
- package/libx/_runtime/hana/Service.js +4 -10
- package/libx/_runtime/hana/customBuilder/CustomSelectBuilder.js +1 -1
- package/libx/_runtime/hana/driver.js +2 -2
- package/libx/_runtime/hana/execute.js +27 -74
- package/libx/_runtime/hana/pool.js +1 -1
- package/libx/_runtime/hana/streaming.js +2 -1
- package/libx/_runtime/index.js +6 -6
- package/libx/_runtime/messaging/AMQPWebhookMessaging.js +5 -21
- package/libx/_runtime/messaging/Outbox.js +2 -2
- package/libx/_runtime/messaging/common-utils/AMQPClient.js +4 -14
- package/libx/_runtime/messaging/common-utils/connections.js +5 -7
- package/libx/_runtime/messaging/common-utils/normalizeIncomingMessage.js +30 -0
- package/libx/_runtime/messaging/enterprise-messaging-shared.js +2 -1
- package/libx/_runtime/messaging/enterprise-messaging-utils/EMManagement.js +36 -30
- package/libx/_runtime/messaging/enterprise-messaging-utils/registerEndpoints.js +19 -12
- package/libx/_runtime/messaging/enterprise-messaging.js +8 -8
- package/libx/_runtime/messaging/file-based.js +5 -5
- package/libx/_runtime/messaging/message-queuing.js +14 -12
- package/libx/_runtime/messaging/outbox/utils.js +18 -19
- package/libx/_runtime/messaging/redis-messaging.js +91 -0
- package/libx/_runtime/messaging/service.js +8 -6
- package/libx/_runtime/remote/Service.js +44 -8
- package/libx/_runtime/remote/utils/client.js +20 -13
- package/libx/_runtime/remote/utils/data.js +11 -11
- package/libx/_runtime/sqlite/Service.js +6 -9
- package/libx/_runtime/sqlite/customBuilder/CustomFunctionBuilder.js +5 -2
- package/libx/_runtime/types/api.js +10 -2
- package/libx/common/utils/ucsn.js +109 -0
- package/libx/gql/resolvers/crud/update.js +5 -0
- package/libx/gql/resolvers/parse/ast2cqn/columns.js +3 -1
- package/libx/gql/schema/typeDefMap.js +2 -2
- package/libx/odata/afterburner.js +110 -16
- package/libx/odata/grammar.pegjs +9 -1
- package/libx/odata/parseToCqn.js +39 -0
- package/libx/odata/parser.js +1 -1
- package/libx/rest/RestAdapter.js +9 -1
- package/libx/rest/middleware/input.js +54 -0
- package/libx/rest/middleware/operation.js +14 -1
- package/libx/rest/middleware/parse.js +11 -7
- package/package.json +1 -1
- package/server.js +34 -19
- package/srv/audit-log.cds +2 -2
- package/srv/flex.cds +8 -2
- package/srv/flex.js +1 -1
- package/srv/mps.cds +23 -0
- package/srv/mps.js +1 -0
- package/libx/_runtime/auth/strategies/utils/uaa.js +0 -21
- package/libx/_runtime/common/generic/auth.js +0 -874
- package/libx/_runtime/common/toggles/alpha.js +0 -43
- package/libx/_runtime/db/generic/arrayed.js +0 -33
- package/libx/_runtime/fiori/uiflex/index.js +0 -35
- package/libx/_runtime/fiori/uiflex/service.js +0 -150
- package/libx/rest/utils/data.js +0 -60
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,102 @@
|
|
|
4
4
|
- The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
5
5
|
- This project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
+
## Version 5.9.0 - 2022-03-25
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Enable custom audit logging implementation by subclassing or prepending `cds.AuditLogService`
|
|
12
|
+
- Log authentication/authorization traces, for example, authentication strategy, and access control decisions to facilitate troubleshooting in debug mode.
|
|
13
|
+
- Bound functions and actions calls with odata-v2 from remote service
|
|
14
|
+
- Beta support for procedure calls with table output data (SAP HANA only)
|
|
15
|
+
+ Both hdb and `@sap/hana-client` currently do not support parameter metadata for table output. To provide the functionality anyways, CAP must fetch the metadata itself. As this is not CAP's expertise, the feature is only beta.
|
|
16
|
+
+ All parameters must be named or unnamed, that is `CALL EXAMPLE_PROC(PARAM_1 => ?,PARAM_2 => ?)` or `CALL EXAMPLE_PROC(?,?)`
|
|
17
|
+
- Alpha `cds.ApplicationService.getRestrictions(definition, event, user)`, which returns the applicable restrictions for the current request as follows:
|
|
18
|
+
+ `null`: unrestricted access
|
|
19
|
+
+ `[]`: no applicable restrictions -> no access
|
|
20
|
+
+ `[{ grant: '...', to: ['...'], where: '...' }, ...]`: applicable restrictions with grant normalized to strings
|
|
21
|
+
+ That is, `grant: ['CREATE', 'UPDATE']` in model becomes `[{ grant: 'CREATE' }, { grant: 'UPDATE' }]`
|
|
22
|
+
+ Promise resolving to any of the above (needed for CAS override)
|
|
23
|
+
- Internal model provider service can be used for obtaining dynamic csn including features and key user extensions
|
|
24
|
+
- Support insert of SQL snippets for HANA migration tables using @sql.append and @sql.prepend annotations.
|
|
25
|
+
- Support for the `@odata.draft.enclosed` annotation on associations targeted via navigation — previously only supported for `$expand`
|
|
26
|
+
- Pseudo role `internal-user` for technical user tokens acquired from own XSUAA instance
|
|
27
|
+
- Include globally-installed cds-dk version in output of `cds version`.
|
|
28
|
+
- Include version of cds-mtx in output of `cds version`, if available.
|
|
29
|
+
- Feature toggle support in `cds build` for cloud deployments. Create language bundles and parsed CSN for all features.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Cleaned up `cds.env.requires` towards a consistent usage:
|
|
34
|
+
+ Moved all entries of `cds.requires` to `cds.requires.kinds` → `cds.requires` is empty now by default, but has `cds.requires.kinds` as prototype, so e.g. `cds.requires.sql` will still return a match.
|
|
35
|
+
+ Added support for db-specific `cds.requires.db.deploy-format` → deprecating `cds.hana.deploy-format` (which is still supported for compatibility)
|
|
36
|
+
+ Introduced `cds.requires.kinds.hana-cloud` as `{kind:hana, deploy-format:hdbtable}` → to be used by default for production
|
|
37
|
+
+ Changed `cds.requires.audit-log` to be consistent to all other; also got moved to `cds.requires.kinds.audit-log`, so it is no longer activated by default.
|
|
38
|
+
+ Added support for `cds.requires.foo: true` with `foo` being a preset/prototype entry in `cds.requires.kinds` → allows to more easily switch on pre-configured services.
|
|
39
|
+
- Update-managed properties (`@cds.on.update`) are always updated
|
|
40
|
+
+ Example: `UPDATE('Books').set({}).where({ ID: 1 })` leads to new modifiedAt and modifiedBy
|
|
41
|
+
+ Does not apply to nested entities that are only preserved by specifying their primary keys in the data
|
|
42
|
+
+ Deactivate during two month grace period via compact feature flag `cds.env.features.update_managed_properties = false`
|
|
43
|
+
- Response no longer contains keys neither technical draft properties (e.g. `HasDraftEntity` or `InProcessByUser`) in expanded data if they were not requested explicitly when using `cds.Service` API
|
|
44
|
+
+ Example:
|
|
45
|
+
```js
|
|
46
|
+
> await srv.read('Authors', a => { a.name, a.books(b => { b.title }) }).where({ ID: 1 })
|
|
47
|
+
// -> "old behaviour" result
|
|
48
|
+
[{ name: 'Emily Brontë', books: [{ title: 'Wuthering Heights', ID: 201 }] }]
|
|
49
|
+
// -> "new behaviour" result
|
|
50
|
+
[{ name: 'Emily Brontë', books: [{ title: 'Wuthering Heights' }] }]
|
|
51
|
+
```
|
|
52
|
+
+ Technical draft properties are not automatically fetched also on a root level
|
|
53
|
+
+ Deactivate during two month grace period via compat feature flag `cds.env.features.auto_fetch_expand_keys = true`
|
|
54
|
+
- Access control is checked in generic handlers (rather than handlers materialized on app startup)
|
|
55
|
+
- Expand restriction check moved to pre-before phase
|
|
56
|
+
- The active state of an entity is read instead of the draft state when navigating from a draft entity to a draft-enabled entity via an association.
|
|
57
|
+
- Authentication middleware is always mounted (used to be only for restricted services)
|
|
58
|
+
- Fiori preview now uses the Horizon theme
|
|
59
|
+
- 'Preview' links in generic index.html page no longer get the word _preview_ appended automatically, allowing for more flexible naming. Link providers should make sure to add the _preview_ word if necessary.
|
|
60
|
+
- Don't throw error in GraphQL adapter if update mutation filter does not match any entries (to be consistent with delete mutations)
|
|
61
|
+
- Remote call of unbound action/function returns octet-stream instead of string by default
|
|
62
|
+
- Default pool's behaviour has been changed from `FIFO` (queue) to `LIFO` (stack). Can be changed in pool configuration.
|
|
63
|
+
- `cds run/serve` now gracefully shuts down the HTTP server before exiting. Custom handlers for signals like `SIGTERM` or `SIGINT` can now be processed.
|
|
64
|
+
- `cds build` no longer creates `COMMENT` statements for HANA if doc comments are present in CDS models. The statements caused superfluous table migrations during HANA deployments.
|
|
65
|
+
|
|
66
|
+
### Fixed
|
|
67
|
+
|
|
68
|
+
- Logging of failed requests to remote services was incompatible to Elasticsearch
|
|
69
|
+
- `cds serve --project <dir>` didn't serve static web resources from `<dir>`
|
|
70
|
+
- `cds serve -p <dir>` was meant to be a shortcut for `cds serve --project <dir>`
|
|
71
|
+
- Messaging: Use correct kind for logging
|
|
72
|
+
- Incorrect return values for update-managed properties (`@cds.on.update`) of child entities that were not changed in request
|
|
73
|
+
- `$filter` with navigation to-one eq null
|
|
74
|
+
- Calculation of `DraftIsProcessedByMe` when navigating to `DraftAdministrativeData`
|
|
75
|
+
- Inbound streaming with media type annotated as `@Core.Computed`
|
|
76
|
+
- Pass column expression into `SELECT()` (example: `SELECT('SUBSTRING(locale,0,2) as loc').from(<entity>)`)
|
|
77
|
+
- Annotation `@cds.api.ignore` ignores key in new parser
|
|
78
|
+
- Inconsistencies in actions and functions API
|
|
79
|
+
- Opening root transaction in `srv.run` if none exists
|
|
80
|
+
- Glitches in handling of `req.user.tenant` and `req.user.locale`
|
|
81
|
+
- Flattened keys in URL are resolved correctly if they are unique in new REST adapter
|
|
82
|
+
- Actions and functions in REST adapter
|
|
83
|
+
- Empty string as key does not work in new parser
|
|
84
|
+
- Requesting property of an entity caused error in new parser
|
|
85
|
+
- The SQLite CSV import now imports `"true"` and `"false"` as strings instead of Booleans
|
|
86
|
+
- Fixed loading mechanism for custom build task handlers
|
|
87
|
+
- `req.diff()` for `UPDATE` on a view with renamed property in `orderBy`
|
|
88
|
+
- `$user.<attr>` for managed properties (`@cds.on.insert`/`@cds.on.update`)
|
|
89
|
+
- GraphQL `__typename` meta field if it is the only selected field of an association/composition
|
|
90
|
+
- Command shortcuts like `cds c` are now handled properly if executed in an NPM script
|
|
91
|
+
- ETag is not included in expanded entities using `$select`, for example: `Books(1)?$expand=author($select=ID)`
|
|
92
|
+
- `cds.compile.to...` no longer crashes if called with a CSN that has a dangling ref
|
|
93
|
+
- Requests to remote services via navigation path without explicit `$select`, but having `$expand` query option
|
|
94
|
+
- `cds.compile` correctly supports reserved namespaces like `cds.foundation`.
|
|
95
|
+
- `cds.compile.to.serviceinfo` now uses the correct configuration for the base URL paths for Java services
|
|
96
|
+
- `cds deploy --to sqlite` correctly localizes texts in deployed views. Before not all localized texts have been correctly resolved.
|
|
97
|
+
- `cds deploy --to hana` reports missing org or space info with better message.
|
|
98
|
+
|
|
99
|
+
### Removed
|
|
100
|
+
|
|
101
|
+
- Redundant locale implementation
|
|
102
|
+
|
|
7
103
|
## Version 5.8.4 - 2022-03-17
|
|
8
104
|
|
|
9
105
|
### Fixed
|
|
@@ -64,6 +160,7 @@
|
|
|
64
160
|
- `$filter` query option in structured mode (OData flavors `w4` and `x4`)
|
|
65
161
|
+ Using JSON-stringified objects no longer occasionally crashes an application
|
|
66
162
|
+ Filtering on a structured element with `ne null` condition also selects data having some `null` properties within
|
|
163
|
+
- Rest: `Content-type` header is set to `text/plain` for primitive data types in response (except for `Boolean`)
|
|
67
164
|
|
|
68
165
|
## Version 5.8.0 - 2022-01-27
|
|
69
166
|
|
|
@@ -86,8 +183,8 @@
|
|
|
86
183
|
+ In payloads, the binary data must be a base64 encoded string
|
|
87
184
|
+ In URLs, the binary data must have the following format: `binary'<url-safe base64 encoded>'`, e.g., `$filter=ID eq binary'Q0FQIE5vZGUuanM='`
|
|
88
185
|
+ The use of binary data in some advanced constructs like `$apply` and `/any()` may be limited
|
|
89
|
-
+ On SQLite, the base64 encoded string is stored
|
|
90
|
-
+ It
|
|
186
|
+
+ On SQLite, the base64 encoded string is stored in the database
|
|
187
|
+
+ It’s strongly discouraged to use binary data as keys. See "Primary Keys — Best Practices" in the documentation.
|
|
91
188
|
- Support for OData annotation `@Core.ContentDisposition.Type` with `attachment` as the default value
|
|
92
189
|
- Support for returning custom stream objects in custom handlers (beta):
|
|
93
190
|
+ Example:
|
|
@@ -119,19 +216,19 @@
|
|
|
119
216
|
- `cds.spawn` also works with synchronous functions
|
|
120
217
|
- Foreign keys in parent are set to `null` when deleting composition of one
|
|
121
218
|
- `cds version` now always prints the version of `@sap/cds-dk`, especially if `cds version` was called from within an npm script, i.e. not from `cds-dk`'s CLI.
|
|
122
|
-
- Better error message in case destination of Remote Service
|
|
219
|
+
- Better error message in case destination of Remote Service isn’t found
|
|
123
220
|
- Differentiate between draft already exists and entity locked
|
|
124
|
-
- OData adapter:
|
|
221
|
+
- OData adapter: roll back transaction before rethrowing standard error in case of atomicity group
|
|
125
222
|
- Results of actions/functions do not ignore custom data when using `$expand` query option
|
|
126
|
-
- `req.data` is available in custom error handler in case of deserialization error thrown by legacy
|
|
223
|
+
- `req.data` is available in custom error handler in case of deserialization error thrown by legacy OData server
|
|
127
224
|
- Joining entities with renamed foreign keys (limited to single-level projections)
|
|
128
225
|
- Requests with draft and `$expand=*` caused problems in some cases
|
|
129
226
|
- `cds serve` during development longer redirects URLs with similar path segments like `/browse/123/browse/` to e.g. `/browse/`
|
|
130
|
-
- Post
|
|
131
|
-
- Deploy to HANA: passing of options to `hdi-deploy` via `HDI_DEPLOY_OPTIONS` now possible
|
|
227
|
+
- Post-processing for renamed columns in expand
|
|
228
|
+
- Deploy to SAP HANA: passing of options to `hdi-deploy` via `HDI_DEPLOY_OPTIONS` now possible
|
|
132
229
|
- Keys as path segments in beta OData to CQN parser
|
|
133
230
|
- OData V2 Remote Service (`"kind": "odata-v2"`):
|
|
134
|
-
+ Request data properties of types `cds.Date`, `cds.DateTime
|
|
231
|
+
+ Request data properties of types `cds.Date`, `cds.DateTime`, and `cds.Timestamp` are converted accordingly to OData V2 specification
|
|
135
232
|
+ Response data properties of types `cds.Decimal`, `cds.DecimalFloat` (deprecated) and `cds.Integer64` are handled properly when using `Accept` header with `IEEE754Compatible=true/false` and `ExponentialDecimals=true/false` format parameters
|
|
136
233
|
|
|
137
234
|
## Version 5.7.6 - 2022-02-23
|
|
@@ -150,7 +247,7 @@
|
|
|
150
247
|
- Negating lambda expressions in OData using the `not` operator
|
|
151
248
|
- Event Mesh: Redelivery count when using AMQP
|
|
152
249
|
- OData requests using lambda expressions on localized data
|
|
153
|
-
- `cds.db.exists` wrongly generated a `SELECT * FROM ...` for
|
|
250
|
+
- `cds.db.exists` wrongly generated a `SELECT * FROM ...` for OData flavor x4
|
|
154
251
|
- Return localized texts on draft activate
|
|
155
252
|
- Unicode characters in unquoted search terms in beta OData to CQN parser
|
|
156
253
|
|
|
@@ -172,7 +269,7 @@
|
|
|
172
269
|
- OData requests using lambda expressions with `contains` function
|
|
173
270
|
- Result of OData query option `$count=true` when using `$apply`
|
|
174
271
|
- `$filter` with navigation to-one equals value crashes
|
|
175
|
-
- `$skiptoken` query option allows
|
|
272
|
+
- `$skiptoken` query option allows using arbitrary symbols except of `&` with beta OData URL to CQN parser (`cds.env.features.odata_new_parser`). In this non-integer value case, the value won’t be parsed into CQN.
|
|
176
273
|
- Function names in `$filter` can now be case insensitive (as per OData 4.01)
|
|
177
274
|
- `$count` in `$expand` caused server to crash
|
|
178
275
|
|
|
@@ -183,14 +280,14 @@
|
|
|
183
280
|
- Instance-based restriction for activation of draft enabled entities
|
|
184
281
|
- `.columns('*')` on projections of remote services using renamed properties
|
|
185
282
|
- GraphQL filters on nested fields are now applied correctly
|
|
186
|
-
- Performance degradation during processing of `where exists`
|
|
283
|
+
- Performance degradation during the processing of `where exists`
|
|
187
284
|
- Read drafts via navigation with complex filter expression
|
|
188
285
|
|
|
189
286
|
## Version 5.7.1 - 2021-12-06
|
|
190
287
|
|
|
191
288
|
### Fixed
|
|
192
289
|
|
|
193
|
-
- Draft (OData flavors `w4`, `x4
|
|
290
|
+
- Draft (OData flavors `w4`, `x4`, and `v4` with structs): Flags `HasActiveEntity`, `HasDraftEntity`, and `IsActiveEntity` are now included in the HTTP response for GET requests.
|
|
194
291
|
- Instance-based restriction on entities using localized fields in draft
|
|
195
292
|
- Results of actions/functions do not ignore nested data if query options are present
|
|
196
293
|
|
|
@@ -209,20 +306,20 @@
|
|
|
209
306
|
+ "opt-in": if included, the runtime check or database constraint applies
|
|
210
307
|
+ Behavior can be overridden via `@assert.integrity: <true/false/'RT'/'DB'>` on property, entity, or service level (lowest applies)
|
|
211
308
|
- Allow `--with-mocks` in production via `cds.env.features.with_mocks = true`
|
|
212
|
-
- Set media type from content
|
|
309
|
+
- Set media type from content-type header while inbound streaming
|
|
213
310
|
- Support for navigations with `$count` in `$filter`, for example `GET Entity?$filter=toMany/$count gt 0`
|
|
214
311
|
- Draft: Generate UUIDs for request payloads to which extra data items are added (without the UUID keys) in a custom application handler.
|
|
215
312
|
- Generate GraphQL schema via `cds compile -2 gql` (alpha)
|
|
216
|
-
- Log requests to remote services if respective log level is set to `debug`
|
|
313
|
+
- Log requests to remote services if the respective log level is set to `debug`
|
|
217
314
|
- Beta OData URL to CQN parser (`cds.env.features.odata_new_parser`):
|
|
218
|
-
+
|
|
219
|
-
+
|
|
220
|
-
+ Supported are following transformations and their combinations: `aggregate`, `groupby`, `topcount`, `bottomcount`, `filter`, `search`
|
|
315
|
+
+ Support for `$skiptoken` query option
|
|
316
|
+
+ Limited support for `$apply` query option
|
|
317
|
+
+ Supported are the following transformations and their combinations: `aggregate`, `groupby`, `topcount`, `bottomcount`, `filter`, `search`
|
|
221
318
|
+ Not supported:
|
|
222
319
|
+ Transformations `topsum`, `bottomsum`, `toppercent`, `bottompercent`, `expand`, `concat`, `compute`, `identity`
|
|
223
320
|
+ `rollup` and `$all` in `groupby` transformation
|
|
224
321
|
+ Filter function `isdefined`
|
|
225
|
-
+ Custom aggregation methods, arithmetic operators (`add`, `sub`, `mul
|
|
322
|
+
+ Custom aggregation methods, arithmetic operators (`add`, `sub`, `mul`, and so on), and keyword `from` in `aggregate` transformation
|
|
226
323
|
+ OData vocabulary for Data Aggregation, `@Aggregation.default` annotation
|
|
227
324
|
+ Out of scope:
|
|
228
325
|
+ Draft handling
|
|
@@ -241,10 +338,10 @@
|
|
|
241
338
|
- Leaner implementation for `sap-statistics`
|
|
242
339
|
- Leading and trailing whitespaces are allowed for `$search` query parameter
|
|
243
340
|
- Insert / Update of Composition of one with empty object is not allowed for non UUID keys
|
|
244
|
-
- Search behavior of whitespaces changed as
|
|
341
|
+
- Search behavior of whitespaces changed as follows:
|
|
245
342
|
+ Searches for plain whitespace, for example, `"$search= "` matches the complete data set.
|
|
246
343
|
+ Searches for whitespace surrounded by double-quotes, for example, `$search=" "` matches all entries containing whitespaces.
|
|
247
|
-
- In single
|
|
344
|
+
- In single-tenant mode, the default SQLite database is used, regardless of `context.tenant`
|
|
248
345
|
- `cds build` for Node.js projects now copies `package-lock.json` files into the staging folder (usually `gen/srv`). This allows the execution of `npm ci` there.
|
|
249
346
|
- Relaxed UUIDs in beta URL to CQN parser (`cds.env.features.odata_new_parser`)
|
|
250
347
|
- Authentication strategies `dummy` and `mock` no longer require `passport`
|
|
@@ -253,15 +350,15 @@
|
|
|
253
350
|
|
|
254
351
|
### Fixed
|
|
255
352
|
|
|
256
|
-
- Path resolution for references in sub
|
|
353
|
+
- Path resolution for references in sub-selects
|
|
257
354
|
- Where exists without infix filter, e.g., `@restrict.where: 'exists author'`
|
|
258
355
|
- `@restrict.where: 'exists [...]'` in draft union scenario
|
|
259
|
-
- Select query with path exists predicates
|
|
356
|
+
- Select query with path exists predicates, for example, `WHERE EXISTS books[year = 2000].pages[wordcount > 1000]`
|
|
260
357
|
- Proper registration of audit log event handlers
|
|
261
358
|
- Draft: Generate foreign keys for request payloads to which extra data items are added in a custom application handler.
|
|
262
359
|
- `cds build` correctly merges `hdbmigrationtable` files that have multiple new migration versions defined.
|
|
263
360
|
- `cds.test` converts response data of failed requests to JSON to prevent lost error details
|
|
264
|
-
- Instance
|
|
361
|
+
- Instance-based restriction for draft enabled entities
|
|
265
362
|
- Delete requests for localized with compositions
|
|
266
363
|
- Ignore input for static and calculated fields during draft activate
|
|
267
364
|
- Clear extension map entry on error during CSN fetching
|
|
@@ -269,7 +366,7 @@
|
|
|
269
366
|
- Requests to mocked remote service when using custom service name with `.service` property
|
|
270
367
|
- Rollback on already backrolled or committed transactions are ignored
|
|
271
368
|
- Rollback handling in spawned background job
|
|
272
|
-
- `cds.spawn()` throws error if passed
|
|
369
|
+
- `cds.spawn()` throws error if passed option is an instance of `cds.EventContext`
|
|
273
370
|
- Delete `timestamp` from options passed to `cds.spawn()` (transactions create their own timestamp)
|
|
274
371
|
- Type error during programmatic action/function call if no params defined
|
|
275
372
|
- Fully qualified bound actions/ functions in beta URL to CQN parser (`cds.env.features.odata_new_parser`)
|
|
@@ -292,8 +389,8 @@
|
|
|
292
389
|
- RFC 3986 compliant segment recognition in beta URL to CQN parser (`cds.env.features.odata_new_parser`)
|
|
293
390
|
- Support for `$skiptoken` OData query option when using beta URL to CQN parser (`cds.env.features.odata_new_parser`)
|
|
294
391
|
- OData requests with `$skip` and without `$top` query option to services with defined default limit (`cds.query.limit.default`)
|
|
295
|
-
- Creating entities with binary keys. Currently the binary keys may be provided only as Node.js `Buffer` instances using a custom handler.
|
|
296
|
-
- Requests with payload containing nested arrayed elements no longer crash the application
|
|
392
|
+
- Creating entities with binary keys. Currently, the binary keys may be provided only as Node.js `Buffer` instances using a custom handler.
|
|
393
|
+
- Requests with a payload containing nested arrayed elements no longer crash the application
|
|
297
394
|
|
|
298
395
|
## Version 5.6.3 - 2021-11-15
|
|
299
396
|
|
|
@@ -302,7 +399,7 @@
|
|
|
302
399
|
- `cds run` does not fail if `cds.requires.multitenancy` is explicitly set to `false`
|
|
303
400
|
- Calculation of `DraftIsCreatedByMe` or `DraftIsProcessedByMe` when expanding or navigating to `DraftAdministrativeData`
|
|
304
401
|
- Nested `any` in `$filter` query option
|
|
305
|
-
- Crash on draft activate after draft edit for not existing composition of one
|
|
402
|
+
- Crash on draft activate after draft edit for not existing composition of one if no explicit DB service is defined
|
|
306
403
|
- Typescript definition of `srv.delete` no longer leads to a duplication error
|
|
307
404
|
|
|
308
405
|
## Version 5.6.2 - 2021-11-08
|
|
@@ -345,11 +442,11 @@
|
|
|
345
442
|
+ Not meant for productive use! For example, authentication and authorization are out of scope.
|
|
346
443
|
- Support of the following features when using beta OData URL to CQN parser (`cds.env.features.odata_new_parser`):
|
|
347
444
|
+ REST-style URLs (example: `GET /Foo/1`)
|
|
348
|
-
+ `$expand=*` query option on different nested expand levels (`$levels`
|
|
349
|
-
+
|
|
350
|
-
+
|
|
351
|
-
+
|
|
352
|
-
+
|
|
445
|
+
+ `$expand=*` query option on different nested expand levels (`$levels` isn’t yet supported)
|
|
446
|
+
+ Draft handling
|
|
447
|
+
+ Structured keys
|
|
448
|
+
+ Streaming
|
|
449
|
+
+ Navigation to primitive properties without `$value` query option
|
|
353
450
|
- Optimized Search: Support `$filter` query option in combination with optimize `$search` and localized data (when the environment variable `cds.env.features.optimized_search` is set to `true`)
|
|
354
451
|
- `GET` requests support static values in ON-conditions of composition parents when using unmanaged backlinks
|
|
355
452
|
- `destinationOptions` can be configured for Remote Services
|
|
@@ -375,7 +472,7 @@
|
|
|
375
472
|
}
|
|
376
473
|
}}}
|
|
377
474
|
```
|
|
378
|
-
- File to store private project settings `.cdsrc-private.json` (
|
|
475
|
+
- File to store private project settings `.cdsrc-private.json` (shouldn’t be checked in source code management)
|
|
379
476
|
- Read additional configuration from JSON files or directory structures using `CDS_CONFIG` env variable
|
|
380
477
|
- Missing typescript definitions for services' `.send` shortcuts `get`, `put`, `post`, `patch`, and `delete`
|
|
381
478
|
- Build VCAP_SERVICES env variable dynamically for compatibility (`cds.env.features.emulate_vcap_services`)
|
|
@@ -390,7 +487,7 @@
|
|
|
390
487
|
### Changed
|
|
391
488
|
|
|
392
489
|
- Query API: Specified keys are now part of the target path, e.g. `SELECT.from('Books', 1)` will move the key condition into `SELECT.from.ref`.
|
|
393
|
-
+ Deactivate during two
|
|
490
|
+
+ Deactivate during two-month grace period via compat feature flag `cds.env.features.keys_into_where = true`
|
|
394
491
|
- Removed duplicate integrity checks
|
|
395
492
|
- Optimized search: Optimize queries for non-localized elements
|
|
396
493
|
- OData to CQN parsing changed to enable remote service consumption. As a side effect, application code in `srv.on('READ', handler)` custom handlers relaying on CQN might need to be adapted. The following has changed:
|
|
@@ -398,7 +495,7 @@
|
|
|
398
495
|
- Previously, if the `$expand` query option was specified in the OData query, all elements of the expanded navigation property were listed explicitly in the CQN query. Now, an `*` (asterisk) is listed instead.
|
|
399
496
|
- Non-specified columns are resolved at database layer
|
|
400
497
|
- `cds deploy` no longer enforces the presence of SAP CommonCryptoLib (checked with env variable `SECUDIR`) on Windows since it uses now the built-in security libraries
|
|
401
|
-
- Target keys are not included
|
|
498
|
+
- Target keys are not included in the body when sending `PATCH` requests to external services
|
|
402
499
|
|
|
403
500
|
### Fixed
|
|
404
501
|
|
|
@@ -411,10 +508,10 @@
|
|
|
411
508
|
- The check for the minimum Node.js version now properly enforces version 12.18, i.e. aborts server startup.
|
|
412
509
|
- `cds.test` fails with a clearer error message if the server wasn't started at all
|
|
413
510
|
- Audit logging for modification of personal or sensitive data when using same entity as a composition child in different parent entities
|
|
414
|
-
- Deleting an entity defined with managed composition of one, whereas a dependent entity is defined having an independent managed association to its composition parent no longer crashes the application
|
|
511
|
+
- Deleting an entity defined with managed composition of one, whereas a dependent entity is defined as having an independent managed association to its composition parent no longer crashes the application
|
|
415
512
|
- Audit logging for entities having arrayed elements
|
|
416
513
|
- Filtering for `cds.Date` on Remote OData V2 services
|
|
417
|
-
- Crash when `rollup` function was used in groupBy in
|
|
514
|
+
- Crash when `rollup` function was used in groupBy in OData requests
|
|
418
515
|
- Or for $filter with IsActiveEntity=true for access to active entities
|
|
419
516
|
- Reading draft-enabled entity with `$expand` targeting non-draft associations
|
|
420
517
|
- Delete with sub-select
|
|
@@ -424,11 +521,11 @@
|
|
|
424
521
|
- Activate draft of entity having `to-one` and `to-many` compositions
|
|
425
522
|
- Caching issue that causes the OData `omit-values` preference in `Prefer` HTTP headers to misbehaves
|
|
426
523
|
- Deletion of draft instances if multiple draft enabled entities are used within one service
|
|
427
|
-
- Queries with `contains` filter targeting a remote
|
|
524
|
+
- Queries with `contains` filter targeting a remote OData v2 service
|
|
428
525
|
- Schema evolution support for nested CDS entities in `cds build`
|
|
429
|
-
- I18n texts with quotes and other special characters get escaped correctly if they appear in XML and
|
|
526
|
+
- I18n texts with quotes and other special characters get escaped correctly if they appear in XML and JSON documents
|
|
430
527
|
- Execution of plain SQL statements on SQLite
|
|
431
|
-
- `Content-Disposition` header is now
|
|
528
|
+
- `Content-Disposition` header is now URL encoded
|
|
432
529
|
|
|
433
530
|
### Removed
|
|
434
531
|
|
|
@@ -481,7 +578,7 @@
|
|
|
481
578
|
|
|
482
579
|
- Typo in `DELETE` method of `cds.test`
|
|
483
580
|
- View resolving for intermediate queries
|
|
484
|
-
- Result post
|
|
581
|
+
- Result post-processing for renamed expands
|
|
485
582
|
- Don't use placeholder values for `null`
|
|
486
583
|
|
|
487
584
|
## Version 5.5.0 - 2021-09-23
|
|
@@ -579,23 +676,23 @@
|
|
|
579
676
|
- Payload for non-writable navigation targets removed from `req.data`
|
|
580
677
|
- `cds build` supports i18n message bundles for Java and Nodejs apps and a default CSN format option for Java
|
|
581
678
|
- View resolving considers renaming of foreign keys and `excluding` names when `columns` are explicitly provided in CQN
|
|
582
|
-
- Resilient acquire for HANA via `cds.env.requires.db.connection_attempts = <number>` (alpha; hard max of 3 enforced)
|
|
679
|
+
- Resilient acquire for SAP HANA via `cds.env.requires.db.connection_attempts = <number>` (alpha; hard max of 3 enforced)
|
|
583
680
|
|
|
584
681
|
### Changed
|
|
585
682
|
|
|
586
683
|
- Messaging: Webhooks will always generate tokens
|
|
587
684
|
- Messaging: In multitenancy mode, messaging artifacts are only deployed to subscribers (unless the service option `deployForProvider` is set to `true`)
|
|
588
|
-
- Messaging: Incoming messages without corresponding handlers
|
|
589
|
-
- If a service executes a query targeting a projection on one of its entities, the query is resolved along with projections to an entity known by the executing service. The result is post-processed to reflect the expected result of the incoming query. The reason is that no handlers of the executing service were executed as they
|
|
590
|
-
+ Deactivate during two
|
|
685
|
+
- Messaging: Incoming messages without corresponding handlers aren’t acknowledged
|
|
686
|
+
- If a service executes a query targeting a projection on one of its entities, the query is resolved along with projections to an entity known by the executing service. The result is post-processed to reflect the expected result of the incoming query. The reason is that no handlers of the executing service were executed as they didn’t know the query target.
|
|
687
|
+
+ Deactivate during two-month grace period via compat feature flag `cds.env.features.resolve_views = false`
|
|
591
688
|
- Use `@sap/cds-compiler`'s `smartId` function to determine whether a reference needs to be quoted.
|
|
592
689
|
+ Allows the use of non-word characters in column names, for example `entity Foo { ![bar/bz]: String; }`.
|
|
593
690
|
+ Support for columns with spaces with feature flag `cds.env.features.spaced_columns`.
|
|
594
691
|
+ Note: Restrictions in other layers (example: OData's simple identifier schema) still apply.
|
|
595
|
-
+ Note: Expressions in references (example: `ref: ['foo as bar']`) currently works but
|
|
692
|
+
+ Note: Expressions in references (example: `ref: ['foo as bar']`) currently works but were never intended to and will be removed in future versions.
|
|
596
693
|
- Clear draft data based on their draft UUID instead of via deep delete
|
|
597
694
|
- Support `@sap/cds-compiler`'s changes for DB constraints: managed and unmanaged compositions of one behave like associations. This means that only `$self`-managed composition of one gets `DELETE CASCADE` constraint. Since all other "2one" cases require extra `DELETE` handled by the runtime, that constraint is ignored.
|
|
598
|
-
- Value with regards to date and time functions
|
|
695
|
+
- Value with regards to date and time functions aren’t converted to strings in the OData protocol adapter
|
|
599
696
|
- No placeholders for `LIMIT` to enable statement caching during pagination
|
|
600
697
|
- Arrayed elements stringified in DB layer
|
|
601
698
|
- Return values of handlers will have precedence over database reads
|
|
@@ -630,7 +727,7 @@
|
|
|
630
727
|
- Expand during draft union
|
|
631
728
|
- Validate content type for `$batch` requests
|
|
632
729
|
- Support for `SELECT` statements in `where` clauses when resolving views
|
|
633
|
-
- `INSERT.rows()`
|
|
730
|
+
- `INSERT.rows()` doesn’t silently fill in `INSERT.entries` anymore → use `INSERT.entries()` to do so instead.
|
|
634
731
|
- `UPDATE(Foo).with({foo:{'=':'bar'})` erroneously produced:
|
|
635
732
|
```js
|
|
636
733
|
{UPDATE:{..., with:{foo:{ref:['bar']}}}} //> wrong
|
|
@@ -650,10 +747,10 @@
|
|
|
650
747
|
- Actions and functions with `Integer` response type in REST services
|
|
651
748
|
- Occasional drop of conditions in `WHERE` depending on the value when using structured types
|
|
652
749
|
- `PATCH` fixed for singletons and when having a keyless, for example, managed to-one navigation path
|
|
653
|
-
- Internal server error when forwarding a query to an external service whose target entity
|
|
750
|
+
- Internal server error when forwarding a query to an external service whose target entity doesn’t contain keys
|
|
654
751
|
- Nested where exists in `@restrict` via navigation (CRUD-only; beta)
|
|
655
752
|
- Expand to one in draft union
|
|
656
|
-
- Patch to
|
|
753
|
+
- Patch to auto exposed entity through composition of aspect from SAP Fiori Elements
|
|
657
754
|
- Diff for delete in draft
|
|
658
755
|
- Streaming requests on views with joins no longer crash the application
|
|
659
756
|
|
|
@@ -662,31 +759,31 @@
|
|
|
662
759
|
- Direct usage of body-parser
|
|
663
760
|
- Queries constructed from `cds.ql` do not have the _internal_ property `cqn` anymore
|
|
664
761
|
- Inofficial variant `SELECT({'expand(foo)':['a','b']})` is not supported anymore
|
|
665
|
-
→ use one of these official APIs for expands instead:
|
|
762
|
+
→ use one of these official APIs for expands instead:
|
|
666
763
|
```js
|
|
667
764
|
SELECT(x => { x.a, x.foo (f =>{ f.b, f.c }) })
|
|
668
765
|
SELECT(['a',{ref:['foo'], expand:['b','c']}])
|
|
669
766
|
```
|
|
670
767
|
- Inofficial variant `SELECT.orderBy('foo','desc')` is not supported anymore
|
|
671
|
-
→ use one of these official APIs instead:
|
|
768
|
+
→ use one of these official APIs instead:
|
|
672
769
|
```js
|
|
673
770
|
SELECT.from(Foo).orderBy({foo:'desc'})
|
|
674
771
|
SELECT.from(Foo).orderBy('foo desc')
|
|
675
772
|
```
|
|
676
773
|
- Inofficial variant `SELECT.orderBy('foo, bar desc')` is not supported anymore
|
|
677
|
-
→ use one of these official APIs instead:
|
|
774
|
+
→ use one of these official APIs instead:
|
|
678
775
|
```js
|
|
679
776
|
SELECT.from(Foo).orderBy({foo:1,bar:-1})
|
|
680
777
|
SELECT.from(Foo).orderBy('foo','bar desc')
|
|
681
778
|
SELECT.from(Foo).orderBy `foo, bar desc`
|
|
682
779
|
```
|
|
683
780
|
- Inofficial variant `SELECT.where({ or: [{ foo: 'bar' }, { foo: 'baz' }] })` is not supported anymore
|
|
684
|
-
→ use one of these official APIs instead:
|
|
781
|
+
→ use one of these official APIs instead:
|
|
685
782
|
```js
|
|
686
783
|
SELECT.from(Foo).where({ foo: 'bar', or: { foo: 'baz' } })
|
|
687
784
|
SELECT.from(Foo).where `foo='bar' or foo='baz'`
|
|
688
785
|
```
|
|
689
|
-
- Usage of SQL window functions during expand on HANA
|
|
786
|
+
- Usage of SQL window functions during expand on SAP HANA
|
|
690
787
|
- Hidden symbol for where clause elements originating from `@restrict`
|
|
691
788
|
- Error masking gate keeper for `cds.env.log.levels.cli`
|
|
692
789
|
|
|
@@ -718,7 +815,7 @@
|
|
|
718
815
|
- Update of deeply nested entity with structured key
|
|
719
816
|
- Order by join column during draft union
|
|
720
817
|
- Skip calculated properties while following projections
|
|
721
|
-
- The `with parameters` clause is now correctly handled in sub
|
|
818
|
+
- The `with parameters` clause is now correctly handled in sub-selects if the locale parameter exceeds three characters
|
|
722
819
|
- Statement already finalized error on SQLite
|
|
723
820
|
|
|
724
821
|
## Version 5.4.3 - 2021-08-16
|
|
@@ -744,7 +841,7 @@
|
|
|
744
841
|
|
|
745
842
|
### Fixed
|
|
746
843
|
|
|
747
|
-
- Erroneously added Brazilian
|
|
844
|
+
- Erroneously added Brazilian Portuguese (`pt_BR`) removed from the list of normalized locales
|
|
748
845
|
|
|
749
846
|
## Version 5.4.0 - 2021-08-02
|
|
750
847
|
|
|
@@ -756,7 +853,7 @@
|
|
|
756
853
|
- Support for `ReadByKeyRestrictions` annotations
|
|
757
854
|
- Support for OData `omit-values` preference in `Prefer` HTTP header
|
|
758
855
|
- Object variant of service methods
|
|
759
|
-
- Brazilian
|
|
856
|
+
- Brazilian Portuguese (`pt_BR`) is now on the list of [normalized locales](https://cap.cloud.sap/docs/guides/i18n#normalized-locales)
|
|
760
857
|
- Support for actions and functions on Remote Service
|
|
761
858
|
|
|
762
859
|
### Changed
|
|
@@ -767,7 +864,7 @@
|
|
|
767
864
|
- Messaging: No more topic manipulation per default
|
|
768
865
|
- For consistency reasons `cds build` now determines the default model path using cds resolve
|
|
769
866
|
- Match XSUAA's user attribute value `$UNRESTRICTED` case insensitive
|
|
770
|
-
- CDS build now uses new CDS logging facade to allow for consistent logging behaviour
|
|
867
|
+
- CDS build now uses new CDS logging facade to allow for consistent logging behaviour across the different CDS modules
|
|
771
868
|
|
|
772
869
|
### Fixed
|
|
773
870
|
|
|
@@ -878,7 +975,7 @@
|
|
|
878
975
|
- Use OData simple identifier format for links to entity sets in generated `index.html`.
|
|
879
976
|
- `cds build` logged duplicate compilation errors for the identical `.cds` file, but with different relative path names.
|
|
880
977
|
- `cds serve` no longer tries to redirect Fiori URLs starting with `$` to service URLs.
|
|
881
|
-
- `cds build` now supports `HANA Table data properties files` in SaaS applications. These files
|
|
978
|
+
- `cds build` now supports `HANA Table data properties files` in SaaS applications. These files haven’t been copied into the sidecar folder.
|
|
882
979
|
- `cds deploy --dry` generates DROP/CREATE DDL statements with an order that also H2 can handle, i.e. with dependant views dropped before basic views.
|
|
883
980
|
- `cds build` now correctly handles symbolic links for nodejs projects on Windows.
|
|
884
981
|
- `cds build` now correctly filters CDS source files when building SaaS applications.
|
|
@@ -971,7 +1068,7 @@ entity Tic { tac: Composition of { toe:String } }
|
|
|
971
1068
|
### Added
|
|
972
1069
|
|
|
973
1070
|
- Custom error handler via `srv.on('error', function (err, req) { ... })` (beta)
|
|
974
|
-
+
|
|
1071
|
+
+ Synchronous modification of passed error only
|
|
975
1072
|
- `cds.log.format()` for custom log formatting
|
|
976
1073
|
|
|
977
1074
|
### Fixed
|
|
@@ -1013,7 +1110,7 @@ entity Tic { tac: Composition of { toe:String } }
|
|
|
1013
1110
|
|
|
1014
1111
|
### Fixed
|
|
1015
1112
|
|
|
1016
|
-
- `cds build` now correctly creates the deployment layout for multitenant applications (sdc folder contents) that have dedicated folder paths configured for db, srv and app modules.
|
|
1113
|
+
- `cds build` now correctly creates the deployment layout for multitenant applications (sdc folder contents) that have dedicated folder paths configured for db, srv, and app modules.
|
|
1017
1114
|
- `cds deploy --to sqlite` now ignores a `_texts.csv` file again if there is a language-specific file like `_texts_en.csv` present
|
|
1018
1115
|
- `cds env` no longer fails to parse `.env` files with JSON values containing `=` characters
|
|
1019
1116
|
|
|
@@ -1223,7 +1320,7 @@ await UPDATE`Books`.with`x = x-${amount}`.where`ID=${ID}`
|
|
|
1223
1320
|
### Fixed
|
|
1224
1321
|
|
|
1225
1322
|
- `cds build` for Java now also creates a default edmx file (the one w/o language suffix) if the `cds.i18n.languages` array is configured with a set of languages. Runtime systems expect this file.
|
|
1226
|
-
- `cds build` now skips empty lines in CSV files when preparing SAP HANA deployment. This
|
|
1323
|
+
- `cds build` now skips empty lines in CSV files when preparing SAP HANA deployment. This doesn’t happens if the build target folder is `.`, because there CSV files are sources that are not touched.
|
|
1227
1324
|
- `cds build` for SAP HANA now writes CSV files more reliably, avoiding sporadic `ENOENT` errors.
|
|
1228
1325
|
|
|
1229
1326
|
## Version 4.4.6 - 2020-12-08
|
|
@@ -1340,7 +1437,7 @@ await UPDATE`Books`.with`x = x-${amount}`.where`ID=${ID}`
|
|
|
1340
1437
|
|
|
1341
1438
|
### Fixed
|
|
1342
1439
|
|
|
1343
|
-
- Fiori preview finds the `express` package again in the case where no `express` is installed in the application's `node_modules`.
|
|
1440
|
+
- SAP Fiori Elements preview finds the `express` package again in the case where no `express` is installed in the application's `node_modules`.
|
|
1344
1441
|
|
|
1345
1442
|
|
|
1346
1443
|
# Version 4.2.6 - 2020-10-26
|
|
@@ -1365,7 +1462,7 @@ await UPDATE`Books`.with`x = x-${amount}`.where`ID=${ID}`
|
|
|
1365
1462
|
- `cds watch` no longer shows an error in absence of model files
|
|
1366
1463
|
- `cds build` no longer fails with an error about module './old/compile'
|
|
1367
1464
|
- Stack trace of some errors have been improved
|
|
1368
|
-
- The `.hdiconfig` file created by `cds build` now includes HANA artifact types from undeploy.json
|
|
1465
|
+
- The `.hdiconfig` file created by `cds build` now includes SAP HANA artifact types from undeploy.json
|
|
1369
1466
|
|
|
1370
1467
|
# Version 4.2.3 - 2020-10-12
|
|
1371
1468
|
|
|
@@ -1386,7 +1483,7 @@ await UPDATE`Books`.with`x = x-${amount}`.where`ID=${ID}`
|
|
|
1386
1483
|
- `cds.env.odata.flavor` to choose from the afore-mentioned presets
|
|
1387
1484
|
- `cds.load` option `plain` replacing former option `clean` (which still is silently supported for compatibility).
|
|
1388
1485
|
- `cds.get` now supports option `flavor` with values: `files` | `sources` | `parsed` | `resolved` | `compiled`.
|
|
1389
|
-
- `sap.common.Currencies`, `Countries`, and `Languages` now have their `code` element annotated with `@Common.Text` pointing to the `name`. In Fiori's value list with fixed values, this will show the `name` rather than the code itself. As before, this only has an effect if `@Common.TextArrangement` is set to `#TextOnly` on the entity the code list is used as `ValueList` for.
|
|
1486
|
+
- `sap.common.Currencies`, `Countries`, and `Languages` now have their `code` element annotated with `@Common.Text` pointing to the `name`. In SAP Fiori's value list with fixed values, this will show the `name` rather than the code itself. As before, this only has an effect if `@Common.TextArrangement` is set to `#TextOnly` on the entity the code list is used as `ValueList` for.
|
|
1390
1487
|
|
|
1391
1488
|
## Changed
|
|
1392
1489
|
|
|
@@ -1432,7 +1529,7 @@ await UPDATE`Books`.with`x = x-${amount}`.where`ID=${ID}`
|
|
|
1432
1529
|
- `cds.entities` w/o namespace parameter now works properly when running out of a compiled model (aka `csn.json` aka 'on Cloud Foundry').
|
|
1433
1530
|
- `cds deploy --to hana` now also handles SAP HANA Cloud services on trial, which are created by the `hana` broker (in contrast to the `hanatrial` broker which still provisions older SAP HANA instances).
|
|
1434
1531
|
- `cds deploy --to hana` no longer uses `cf marketplace`, which has changed its parameters in CF CLI v7.
|
|
1435
|
-
- Fiori preview's html no longer provokes Javascript errors in the Fiori client.
|
|
1532
|
+
- SAP Fiori Elements preview's html no longer provokes Javascript errors in the SAP Fiori client.
|
|
1436
1533
|
- For DB services of kind `sql` the service implementation is now set correctly in the cds configuration. Previously, `sql` services got a `sqlite` implementation even if they were set to `hana` in production.
|
|
1437
1534
|
- Custom event handlers that do not register with a path (only with event and function) no longer crash the runtime
|
|
1438
1535
|
- In Typescript typings, the API declaration for `cds.load` and the `bootstrap` event is now fixed.
|
|
@@ -1522,18 +1619,18 @@ Nevertheless, they are listed here for your reference.
|
|
|
1522
1619
|
|
|
1523
1620
|
- **`cds build --production`** — builds the project using the `production` profile - same when `NODE_ENV` or `CDS_ENV` environment variable is set to `production`. This will create HANA deployment artifacts if `kind: "sql"` has been defined.
|
|
1524
1621
|
|
|
1525
|
-
- **`cds build --for <hana|java-cf|node-cf|mtx> --opts <...>`** — now supports execution of auto-created or configured build tasks. Individual properties can be overwritten by passing corresponding CLI options, defaults are used otherwise.
|
|
1622
|
+
- **`cds build --for <hana|java-cf|node-cf|mtx> --opts <...>`** — now supports execution of auto-created or configured build tasks. Individual properties can be overwritten by passing corresponding CLI options, defaults are used otherwise. For example, `cds build --for hana --dest target --opts model=[data,srv,app]`. **Note:** The parameter `options-model` has been deprecated use `--opts model=[...]`instead.
|
|
1526
1623
|
|
|
1527
1624
|
- The set of languages that is honored for the `i18n.json` language pack can now be configured through `i18n.languages`. Default is still `all`, which means the sum of language files found next to models.
|
|
1528
1625
|
|
|
1529
1626
|
## Fixed
|
|
1530
|
-
- Fiori preview is now working again with the latest version of SAP UI5.
|
|
1627
|
+
- SAP Fiori Elements preview is now working again with the latest version of SAP UI5.
|
|
1531
1628
|
|
|
1532
1629
|
- **Use latest SAP CommonCryptoLib help** — when SAP CommonCryptoLib is missing during `cds deploy --to hana`.
|
|
1533
1630
|
|
|
1534
1631
|
- `sql_mapping` is only written to `csn.json` if the classic Java runtime and no default naming is used.
|
|
1535
1632
|
|
|
1536
|
-
- Fiori dev support in `cds run` now also honors `/v2` URLs. These are installed by default by the `@sap/cds-odata-v2-adapter-proxy`.
|
|
1633
|
+
- SAP Fiori Elements dev support in `cds run` now also honors `/v2` URLs. These are installed by default by the `@sap/cds-odata-v2-adapter-proxy`.
|
|
1537
1634
|
|
|
1538
1635
|
- npm scripts that wrap around cds-dk commands like `cds watch` now also work on Windows. Previously they couldn't find the cds command.
|
|
1539
1636
|
|
|
@@ -1566,7 +1663,7 @@ Nevertheless, they are listed here for your reference.
|
|
|
1566
1663
|
|
|
1567
1664
|
- The `UI.Identification` annotation for `sap.common.CodeList` got a correct value, pointing to its `name` element.
|
|
1568
1665
|
- Configuration `requires.<foo>.credentials.destination` is now preserved again when running with `VCAP_SERVICES`. In version 3.34.1 it was cleared.
|
|
1569
|
-
- Entities annotated with `@cds.persistence.skip:if-unused` (like `sap.common.Languages`) now again are skipped when compiling to HANA output. This got broken in previous versions when using the new compiler APIs.
|
|
1666
|
+
- Entities annotated with `@cds.persistence.skip:if-unused` (like `sap.common.Languages`) now again are skipped when compiling to SAP HANA output. This got broken in previous versions when using the new compiler APIs.
|
|
1570
1667
|
- `sql_mapping` is again written to `csn.json` as it's required by classic Java runtime.
|
|
1571
1668
|
- `default-env.json` is now read even in production, which is in line with the behavior of other modules that honor this file. Real prod environments like CF will still overwrite these defaults.
|
|
1572
1669
|
- `cds build` caused error `invalid option` — when passing command line options like `log-level`, `src` or `for`.
|
|
@@ -1772,7 +1869,7 @@ Support for `cds init` is now moved to `@sap/cds-dk`.
|
|
|
1772
1869
|
|
|
1773
1870
|
# Version 3.21.1 - 2020-01-07
|
|
1774
1871
|
## Fixed
|
|
1775
|
-
- Fiori preview no longer crashes since it's pinned to SAP UI5 1.72.3. Actual cause still needs to be investigated.
|
|
1872
|
+
- SAP Fiori Elements preview no longer crashes since it's pinned to SAP UI5 1.72.3. Actual cause still needs to be investigated.
|
|
1776
1873
|
|
|
1777
1874
|
## Version 3.21.0 - 2019-12-11
|
|
1778
1875
|
|
|
@@ -1983,8 +2080,8 @@ Support for `cds init` is now moved to `@sap/cds-dk`.
|
|
|
1983
2080
|
- `cds compile` now understands `--to edmx-v2` and `--to edmx-v4` to produce OData metadata of versions 2 or 4, respectively.
|
|
1984
2081
|
|
|
1985
2082
|
## Changed
|
|
1986
|
-
- Fiori preview in `cds run` now is only added if OData services are being served.
|
|
1987
|
-
For other protocols like `rest`, no Fiori preview is provided.
|
|
2083
|
+
- SAP Fiori Elements preview in `cds run` now is only added if OData services are being served.
|
|
2084
|
+
For other protocols like `rest`, no SAP Fiori Elements preview is provided. Same holds true for the `$metadata` link.
|
|
1988
2085
|
- `cds compile` now behaves better in non-TTY scenarios (e.g. when piping to files). It writes a proper JSON
|
|
1989
2086
|
string instead of a Javascript object. Previously, one had to enforce JSON using the `--to json` processor. Compare e.g. the output of `cds compile model.cds` to `cds compile model.cds > model.json`.
|
|
1990
2087
|
|
|
@@ -2092,7 +2189,7 @@ Support for `cds init` is now moved to `@sap/cds-dk`.
|
|
|
2092
2189
|
# Version 3.10.0 - 2019-05-21
|
|
2093
2190
|
|
|
2094
2191
|
## Added
|
|
2095
|
-
- Tables and view for localized entities are created by default now, both for HANA and SQLite.
|
|
2192
|
+
- Tables and view for localized entities are created by default now, both for SAP HANA and SQLite.
|
|
2096
2193
|
- Internal errors are now marked as such in all CLI commands, with a request to report them.
|
|
2097
2194
|
|
|
2098
2195
|
## Changed
|
|
@@ -2220,7 +2317,7 @@ Support for `cds init` is now moved to `@sap/cds-dk`.
|
|
|
2220
2317
|
|
|
2221
2318
|
## Fixed
|
|
2222
2319
|
- In `cds serve` service providers where added twice to the express app. This is fixed.
|
|
2223
|
-
- In the logs of `cds serve` false warnings on
|
|
2320
|
+
- In the logs of `cds serve` false warnings on SAP Fiori Elements requests are now gone.
|
|
2224
2321
|
- `cds serve` no longer fails on localization for unbound actions.
|
|
2225
2322
|
- The project template was fixed to properly wire up the connection to SAP HANA.
|
|
2226
2323
|
|
|
@@ -2492,7 +2589,7 @@ Same as version 2.3.2, but including the generic service provider for Node.js (`
|
|
|
2492
2589
|
- CDS configuration in `package.json` can now be omitted if you follow the standard project layout, i.e. if you place your model files in `db/`, `srv/`, and `app/` folders.
|
|
2493
2590
|
|
|
2494
2591
|
## Changed
|
|
2495
|
-
- Previously data models needed to include import statements to the service models (e.g. `using from '../srv'`), so that the Java runtime could use these service views on the DB to execute queries. The views are now included automatically, so that you can remove the
|
|
2592
|
+
- Previously data models needed to include import statements to the service models (e.g. `using from '../srv'`), so that the Java runtime could use these service views on the DB to execute queries. The views are now included automatically, so that you can remove the explicit `using` clauses.
|
|
2496
2593
|
- Calling just `cds` on the command line now prints its help. The previously started REPL is now available with `cds repl` (or just `cds r`).
|
|
2497
2594
|
|
|
2498
2595
|
## Fixes
|