
# Changelog 2022

<style scoped >
  em { font-style:normal; font-weight: 500 }
  em:after { content:" —" }
  li { margin: 5px 0; }
</style>
## December 2022

### Added {#dec-22-added}

- _[cds-dk@6.4.0]_ `cds add helm` now supports App Router.
- _[cds-dk@6.4.0]_ `cds subscribe --local` starts `@sap/cds-mtxs` locally instead of contacting a running instance via URL.
- _[cds-dk@6.4.0]_ `cds unsubscribe` removes the subscription of a tenant from a SaaS app.
- _[vscode-cds@6.4.0]_ CAP notebooks:
  - possibility to declare variables and use them in magic commands, shell cells and terminal cells
  - magic command `%%systeminfo` to render system information into the notebook
  - magic command `%%writefile` with append option `-a`
- _[vscode-cds@6.4.0]_ formatter: new options `whitespaceBeforeColonInAnnotation` and `whitespaceAfterColonInAnnotation` for specific configuration in annotations
- _[cds-compiler@3.5.0]_ grammar: `localized` is now allowed in select items as well, to force the creation of convenience views.
- _[cds-compiler@3.5.0]_ to.edm(x):
  - Validate annotation values of OASIS/SAP vocabulary term definitions against `@Validation.AllowedValues`.
  - Reveal dangling type references in produced EDM.
  - `@Capabilities` 'pull up' introduced with 3.3.0 must now be switched
    on with option `odataCapabilitiesPullup`.
- _[cds-compiler@3.5.0]_ If option `addTextsLanguageAssoc` is set but ignored by the compiler, an info message is emitted.
  This can happen if, e.g., the `sap.common.Languages` entity is missing.
- _[cds-compiler@3.5.0]_ Add OData vocabularies 'Offline' and 'PDF'.
- _[cds.java@1.30.0]_ A ChangeSet Context now allows registering multiple ChangeSet members. This enables independent transactions to share the same transactional boundaries. Note that independent transaction are not committed together atomically.
- _[cds.java@1.30.0]_ A Persistence Service is now automatically created for every database service binding, not just the primary one. You can also explicitly configure additional Persistence Services with the new `cds.persistence.services` configuration. This allows to create Persistence Services for arbitrary DataSource beans present in the Spring Boot application.
- _[cds.java@1.30.0]_ A `MessagingService` can now force a queue subscription, even if no topics are explicitly subscribed by setting `cds.messaging.services.<key>.queue.forceListening` to `true`. This is useful for scenarios where messages directly published to the queue should be received (e.g. dead-letter queues).
- _[cds.java@1.30.0]_ A `MessagingService` now emits a `MESSAGING_ERROR` event, when processing of a message fails. This event can be used to decide if the message should be acknowledged nevertheless or if it should be redelivered by the messaging broker.
- _[cds.java@1.30.0]_ The `cds-maven-plugin` now supports adding `@Generated` to classes generated based on the application's CDS model.
- _[cds.java@1.30.0]_ Introduced a new experimental OData V4 response JSON serializer to improve performance. It can be enabled by setting `cds.odataV4.serializer.enabled` to `true`.
- _[cds.java@1.30.0]_ OData v4 delta collections in deep updates (`PATCH` single entity) can now be used by adding the `@delta` suffix to the name of the collection data. Entities that shall be removed/deleted need to be marked with `@removed: {reason: 'changed'|'deleted'}`.
- _[cds.java@1.30.0]_ The new option `cds.security.authorization.enabled: false` disables the generic authorization handler. This option must be used only for local testing where authorization checks are not required.
- _[cds.java@1.30.0]_ The `cds-services-archetype` generates new CAP Java projects with the Spring Boot DevTools dependency included.
- _[cds.java@1.30.0]_ Added an initial version of a Kafka implementation for the MessagingService APIs with `cds-feature-kafka`.
- _[cds4j@1.34.0]_ Delta List support in Deep Updates and Upserts
- _[cds4j@1.34.0]_ Type propagation for functions (min, max, toupper, count, ...)
- _[cds4j@1.34.0]_ CDS annotation cache to reduce overall memory usage of the CDS model
- _[cds4j@1.34.0]_ `CdsModelReader.Config` that allows UI annotation inclusion (excluded by default)
- _[cds4j@1.34.0]_ Annotate generated accessor and builder interfaces with `@Generated`
- _[cds4j@1.34.0]_ Add `CDS_NAME` constant to generated builder interfaces of CDS events
- _[cds@6.4.0]_ Signatures for `ql.UPSERT`
- _[cds@6.4.0]_ Runtime support for flat database UPSERTs
- _[cds@6.4.0]_ `enterprise-messaging`: Support for `@sap/cds-mtxs`
- _[cds@6.4.0]_ `persistent-outbox`: Support for parallel processing with option `parallel: true` as well as pluggable processor functions through `service.outbox.process` <Beta />
- _[cds@6.4.0]_ `cds version` now also lists packages with `@cap-js/` prefix from dependencies
- _[cds@6.4.0]_ `cds.context.http` is now available for webhook-based requests
- _[cds@6.4.0]_ `cds build` for SAP HANA migration tables now only saves model entities annotated with `@cds.persistence.journal` as `last-dev` version.
- _[cds@6.4.0]_ `cds deploy` now uses the `VCAP_SERVICES` environment variable (if set), and skips `cf` operations in this case
- _[cap-js/graphql@0.1.0]_ To-many relationships are now represented by an additional nesting level which contains the fields `totalCount` and `nodes`. `totalCount` is similar to OData `$count`. `nodes` contains the fields belonging to the entity. This is similar to the GraphQL cursor connection specification, but without an additional second `edges` nesting level. The following shows an example query using the new schema structure:

  ```graphql
  {
    AdminService {
      Books {
        totalCount
        nodes {
          title
        }
      }
    }
  }
  ```

- _[cap-js/graphql@0.1.0]_ Support for aliases on fields returned by mutations
- _[cap-js/graphql@0.1.0]_ Improved support for aliases on fields that represent compositions and associations (some limitations still apply)
- _[cap-js/graphql@0.1.0]_ Include localized `texts` fields of entities in schema generation
- _[cap-js/graphql@0.1.0]_ Improve check to skip field `localized` during schema generation
- _[cds-mtxs@1.3.3]_ The built-in Service Manager client now supports X.509 (mTLS) certificates in addition to the client-credentials authentication flow.
- _[cds-mtxs@1.3.3]_ `cds-mtx` commands now exit the process correctly on SAP HANA when there's an error in the command.
- _[cds-mtxs@1.3.3]_ SAP HANA encryption parameters are now correctly forwarded to the service-manager on subscription

### Changed {#dec-22-changed}

- _[cds-dk@6.4.0]_ `cds add multitenancy` will not compile internal roles into the `xs-security.json` any more.
- _[cds-dk@6.4.0]_ `cds add hana` does not create a `hdi-service-name: ${service-name}` for the database resource properties any more.
- _[cds-dk@6.4.0]_ MTX-related commands now print usage help in case of known errors.
- _[cds-dk@6.4.0]_ `cds import` now adds the annotation `@open` for all the Entities and ComplexTypes with attribute `Abstract` or `OpenType` and adds the same for those referred by the attribute `BaseType`.
- _[cds-dk@6.4.0]_ `cds import` now adds default value in the CSN for the optional parameters in action/function for OData V4 files.
- _[cds-dk@6.4.0]_ `cds init` uses latest Maven Java archetype version 1.30.0 for creating Java projects.
- _[vscode-cds@6.4.0]_ minimum VS Code version is now 1.72.0
- _[vscode-cds@6.4.0]_ uses classic `cds-lsp` for compiler versions < 3
- _[vscode-cds@6.4.0]_ formatter: non-inline pre-annotations are now prefixed with an empty line to separate them from preceding elements
- _[cds-compiler@3.5.0]_ to.edm(x):
  - Vocabulary references to `Common` and `Core` are added to the generated EDM by default to allow
    usage of these vocabularies in HTTP messages even if the terms are not being used in the EDM itself.
  - API representation of enum types as `@Validation.AllowedValues` has been shifted from `for.odata` to
    `to.edm(x)`. This allows to reuse imported enum types in new APIs.
  - Messages raised from the EDM annotation renderer have been reworked with message id and enhanced message
    position including the annotation under investigation.
  - `@Validation.AllowedValues` annotation as introduced for enum elements with
    1.44.2
    are now always rendered into the API regardless of `@assert.range`.
- _[cds-compiler@3.5.0]_ to.cdl: The input CSN is no longer cloned for client-CSN and parseCdl-CSN,
  as the renderer does not modify it.
- _[cds-compiler@3.5.0]_ A new warning is emitted if compositions of anonymous aspects are used with the `Association`
  keyword instead of `Composition`. Replace the former with the latter to fix the warning.
- _[cds.java@1.30.0]_ The default Node.js version in goal `install-node` of the `cds-maven-plugin` is bumped to version `v16.18.1`.
- _[cds.java@1.30.0]_ The minimum required `@sap/cds-dk` version in goal `cds` of the `cds-maven-plugin` is changed from `3.0.0` to `4.0.0`.
- _[cds.java@1.30.0]_ The property `cds.deploy.component-scan` is superseded by documented property `cds.multitenancy.deploy.component-scan`.
- _[cds.java@1.30.0]_ The `sap-language` query parameter now has lower priority than the `Accept-Language` header. If you require a query parameter to specify the locale use `sap-locale`, which follows BCP 47 specification.
- _[cds.java@1.30.0]_ The `DataSource` beans created by the CAP Java SDK based on service bindings are now named `ds-<binding>` instead of earlier `<binding>`. This is to make room for a Persistence Service bean, that is now auto-configured with name `<binding>`.
- _[cds.java@1.30.0]_ When setting `cds.datasource.csvInitializationMode` to `always` an Upsert instead of an Insert statement is executed. This enables using CSV initialization with PostgreSQL or file-based SQLite and H2.
- _[cds.java@1.30.0]_ Annotations starting with `UI.` are no longer provided in the `CdsModel` reflection API to save memory resources. Those annotations are expected to be relevant only for Fiori UIs. In case access to these annotations is required through the reflection API, set `cds.model.includeUiAnnotations` to `true`.
- _[cds.java@1.30.0]_ The `max-failed-attempts` property for a messaging queue configuration has been deprecated because in this case the error handler can be used for more custom scenarios.
- _[cds4j@1.34.0]_ Optimize memory footprint of CDS Model
- _[cds4j@1.34.0]_ Optimize memory footprint of `ResultBuilder`
- _[cds4j@1.34.0]_ Optimize execution of to-one expands with nested to-many expands
- _[cds4j@1.34.0]_ Optimize instantiation of `CdsDataProcessor`
- _[cds@6.4.0]_ `.columns(…)` of both `cql.SELECT` and `cql.INSERT` give improved code completion when paired when appropriate type definitions are present
- _[cds@6.4.0]_ Status code of error messages caused by empty `not null` fields is changed from `400` to `500` on database layer. Note that as result the error message `Value is required` in production will be replaced by `Internal server error` in the HTTP response.
- _[cds@6.4.0]_ Underscores in environment variables can now be escaped by two `__` to set keys in `cds.env`.  For example, use `CDS_FEATURES_WITH__MOCKS=...` to set `features.with_mocks`.  Note that previously, this ended up as  `features: { with_: { mocks:... }}`, so in rare cases, it might yield unexpected results.
- _[cds@6.4.0]_ `persistent-outbox`: Only programming errors lead to `process.exit()`, unrecoverable ones are only logged and their `attempts` are updated to `options.maxAttempts`
- _[cds@6.4.0]_ Global configuration of CSRF-token handling for remote services `cds.env.features.fetch_csrf` is deprecated. Instead, please use `csrf: true/false` and `csrfInBatch: true/false` in the configuration of your remote services. These options will allow to configure CSRF-token handling for each remote service separately.
- _[cds@6.4.0]_ `cds build` no longer creates `engines` entry in package.json in case none has been defined. The Node.js version matched the minimal supported version of the CDS runtime and might therefore already be outdated.
- _[cds@6.4.0]_ For streamlined MTX, `@sap/cds` now uses the custom SAP Service Manager client built into `@sap/cds-mtxs`
- _[cds@6.4.0]_ Require new package `@cap-js/graphql` for `cds compile -2 graphql`
- _[cap-js/graphql@0.1.0]_ The GraphQL protocol adapter now uses a new middlewares mechanism instead of `cds.plugins` which requires `@sap/cds` version 6.3 to run. Enable the `cds.requires.middlewares` flag and register the GraphQL protocol adapter in `cds.env.protocols` to get started.
- _[cap-js/graphql@0.1.0]_ Replaced `debug` level query and mutation logging with improved `info` level request logging
- _[cds-mtxs@1.4.0]_ Async API calls now have a `x-job-id` header.
- _[cds-mtxs@1.4.0]_ Improved error handling for the Service Manager client.
- _[cds-mtxs@1.4.0]_ When doing asynchronous updates for multiple tenants, you can now poll the status for each individual tenant. Continue using the `Location` response header to poll the status for all tenants.
  - This is what a sample response body for an asynchronous request to `/-/cds/saas-provisioning/upgrade` looks like:

  ```json
  {
    "ID": "<jobID>",
    "createdAt": "2022-12-12T13:07:15.817Z",
    "op": "upgrade",
    "tenants": {
        "t1": {
            "ID": "<taskID>"
        }
    }
  }
  ```

- _[cds-mtxs@1.3.3]_ The built-in Service Manager client now supports pagination tokens. This allows for more than 1250 tenants.

### Fixed {#dec-22-fixed}

- _[cds-dk@6.4.0]_ `cds init` no longer creates `engines` entry in package.json to avoid `unsupported engine` warnings.
- _[cds-dk@6.4.0]_ `cds subscribe` correctly exits the process after deploying to a HANA database.
- _[cds-dk@6.4.0]_ `cds add multitenancy` doesn't create a duplicate `saas-registry` resource if there's one with `service-plan: service` any more.
- _[cds-dk@6.4.0]_ `cds bind` now correctly maps the `hana-mt` and `sql-mt` shortcuts to the `cds.requires.db` entry.
- _[cds-dk@6.4.0]_ `cds add mtx` no longer fails if the `mtx/sidecar` folder doesn't exist.
- _[cds-dk@6.4.0]_ `cds compile --to xsuaa` now rejects expressions leading to invalid XSUAA attributes like `$user.foo-bar`, `$user.foo/bar`, `$user.foo.bar`
- _[cds-dk@6.4.0]_ `cds compile --to xsuaa -o <file>` now sets `.json` as file ending instead of `.xsuaa`
- _[cds-compiler@3.5.2]_ to.sql/hdi/hdbcds: Don't process references in actions, as they have no impact on the database - avoids internal errors
- _[cds-compiler@3.5.0]_ Enums with a structured base type were accidentally not warned about if used in annotation definitions.
- _[cds-compiler@3.5.0]_ for.odata/for.hana: Instead of parenthesising tuple expansion with `()`, put
  newly created expression in a `xpr` expression, if the term has more than one expansion.
- _[cds-compiler@3.5.0]_ Annotation on indirect or inferred enum values were sometimes lost
- _[cds-compiler@3.5.0]_ to.cdl:
  - Certain keywords of special functions no longer add superfluous parentheses.
  - Extension rendering now supports type extensions as well as `key` for elements.
  - Builtins that clashed names with implicit contexts were not rendered with `cds.` prefix.
  - Unknown artifacts (as can happen in parseCdl-style CSN) are now rendered as `USING` statements.
  - Type extensions in `csn.extensions` (e.g. for `length`) are now rendered.
- _[cds-compiler@3.5.0]_ to.edm(x):
  - Fix a bug in type exposure when using `@cds.external` complex types.
  - Don't remove empty `Edm.EntityContainer`.
  - Aspects with actions outside of services are no longer warned about.
- _[cds-compiler@3.5.0]_ for.hana: Fix a foreign key replacement bug during association to join translation.
- _[cds.java@1.30.1]_ Fixed a bug that caused messages to be redelivered when using Event Mesh with webhooks, even if the error handler acknowledged the message.
- _[cds.java@1.30.1]_ Fixed a bug that caused incompatibilities with `@sap/cds-mtxs@1.4.0` or greater.
- _[cds.java@1.30.0]_ Fixed a bug that caused unacknowledged JMS messages to be never redelivered, except after an application restart.
- _[cds.java@1.30.0]_ Fixed a bug that caused test classes to be included in the main compile step, when generating interfaces to `src/test`.
- _[cds.java@1.30.0]_ Fixed a bug that caused incorrect responses when following OData next links, where `$skiptoken` had a larger value than `$top`.
- _[cds4j@1.34.0]_ Include properties with `null` values in `toJson()` serialization
- _[cds4j@1.34.0]_ Fix duplicate key error in deep updates/upserts
- _[cds4j@1.34.0]_ Fixed SQlite generation for CQN select statements using `lock()`
- _[cds@6.4.0]_ Type `expr` of CQN can now describe function calls
- _[cds@6.4.0]_ Added missing optional `options` parameter in signature of `cds.serve`
- _[cds@6.4.0]_ `cds deploy` handles empty result from `cf` call correctly
- _[cds@6.4.0]_ When using CQL projections with array types, the type of the projection variable will now be correctly inferred as a single element of that array
- _[cds@6.4.0]_ `cds deploy` logs without label
- _[cds@6.4.0]_ Localized draft requests with nested expand in the case of `to many` now return localized data
- _[cds@6.4.0]_ Protected service root for REST adapter
- _[cds@6.4.0]_ `cds build` logs tar error message
- _[cds@6.4.0]_ Resolve view only with renamed fields in orderBy case
- _[cds@6.4.0]_ In case of `$apply` no default values for `top` or `skip` are set in subselects
- _[cds@6.4.0]_ Environment variables like `cds.requires.<service>.kind...` now consistently override services set in e.g. `package.json`
- _[cds@6.4.0]_ Expand of composition backlink now accesses draft instance instead of active
- _[cds@6.4.0]_ Performance of server bootstrap for services with lots of entities
- _[cds@6.4.0]_ Error with virtual properties in expand combined with draft
- _[cds@6.4.0]_ req.tenant is properly propagated by custom authentication in odata and rest
- _[cds@6.4.0]_ Error with `SiblingEntity` in draft
- _[cds@6.4.0]_ Quoting of keys typed as `cds.String` in error targets. Error targets are a relative resource path to correlate error messages with the corresponding text input filed in the UI in an OData HTTP error response body for errors, warnings, and info messages. For example:

    ```diff
    HTTP/1.1 400 Bad Request
    OData-Version: 4.0
    content-type: application/json;odata.metadata=minimal
    Connection: close
    Content-Length: 145
    {
      "error": {
        "code": "400",
        "message": "Value is required",
    -    "target": "items(ID=string-key-1)/text",
    +    "target": "items(ID='string-key-1')/text",
        "@Common.numericSeverity": 4
      }
    }
    ```

- _[cds@6.4.0]_ Application crash if batched Uri uses invalid percent encoding
- _[cds@6.4.0]_ `cds build` for SAP HANA no longer produces `hdbtabledata` for csv files that refer to non-existing entities. This can be the case for imported content packages that bring csv files for entities that are not used in the application model.
- _[cds@6.4.0]_ `cds build` for SAP HANA now gives precedence for csv files from application layer. This is important for imported content packages that bring csv files that shall be overwritten in the application layer.
- _[cds@6.4.0]_ `cds build` for Java no longer adds the service `cds.xt.MTXServices` to the application model.
- _[cds@6.4.0]_ `cds build` no longer fails when creating large resource TAR archives for MTXS projects.
- _[cds-mtxs@1.4.3]_ Asynchronous jobs now return a directly-consumable URL for Cloud Foundry deployments in the `Location` header.
- _[cds-mtxs@1.4.3]_ Some incorrect status reports for the job and task polling have been fixed.
- _[cds-mtxs@1.4.3]_ Stability improvements for SAP HANA tenant lifecycle operations, most notably unhandled promise rejections exiting the process have been fixed.
- _[cds-mtxs@1.4.2]_ `/-/cds/jobs/pollTask` now correctly fetches the task status.
- _[cds-mtxs@1.4.2]_ Jobs now have the correct default `RUNNING` status.
- _[cds-mtxs@1.4.1]_ Fixed an error during parsing tenant metadata that occurs when the tenant metadata is empty.
- _[cds-mtxs@1.4.1]_ Async upgrade parallelization via database clustering now works correctly with the new jobs service.
- _[cds-mtxs@1.4.1]_ Improved `tenant_id` correlation for Kibana logging.
- _[cds-mtxs@1.3.3]_ Improved error handling for the built-in Service Manager client.
- _[cds-mtxs@1.3.3]_ Tenant metadata can now be retrieved programmatically for all tenants via

    ```js
    const sps = await cds.connect.to('cds.xt.SaasProvisioningService')
    const tenants = await sps.get('/tenant')
    ```

- _[cds-mtxs@1.3.3]_ `UPDATE`, `DELETE` and `upgrade` APIs of `cds.xt.SaasProvisioningService` can now also be called programmatically.
- _[cds-odata-v2-adapter-proxy@1.9.16]_ Reject proxy processing of non OData services
- _[cds-odata-v2-adapter-proxy@1.9.16]_ Use stream pipeline for result streaming
- _[cds-odata-v2-adapter-proxy@1.9.16]_ Proxy does not end request to target anymore after writing body
- _[cds-odata-v2-adapter-proxy@1.9.16]_ Document that managed compositions will not work correctly in Fiori Elements V2

### Removed {#dec-22-removed}

- _[vscode-cds@6.4.0]_ OS specific CAP notebook cell types `Windows Bat (bat)`, `PowerShell`, `Shell Script (Bash)` are now replaced by cross-platform `Native Shell (shell)`
- _[cds-compiler@3.5.0]_ to.edm(x): 'Empty Schema' warning has been removed.
- _[cds@6.4.0]_ Removed `PreconditionFailedError` when sending a request with an `if-match` header on an entity without an etag
- _[cds@6.4.0]_ Check for forbidden deep operations for associations on database layer. All non key fields for associations provided by request are ignored. Check <https://cap.cloud.sap/docs/guides/services/providing-services#associations-vs-compositions> for more information. Note that this is a breaking change for applications that rely on checks for forbidden deep operations by runtime.

## November 2022

### Added {#nov-22-added}

- _[cds-dk@6.3.0]_ `cds deploy --to h2 --dry` to create drop/create DDL for H2. Full deployment (w/o `--dry`) is not yet supported, though.
- _[cds-dk@6.3.0]_ `cds push <file>|<URL>` to specify a custom extension archive by local path or download URL.
- _[vscode-cds@6.3.0]_ CAP notebook magic command '%%extendjson' can be used to extend and overwrite existing JSON files
- _[vscode-cds@6.3.0]_ CAP notebook now supports working directory for terminal cells
- _[vscode-cds@6.3.0]_ formatting of artifact and type extensions
- _[vscode-cds@6.3.0]_ syntax highlighting of element extensions
- _[vscode-cds@6.3.0]_ syntax highlighting of numbers and some known types
- _[cds.java@1.29.0]_ The goal `install-node` of the `cds-maven-plugin` supports basic authentication to download a Node.js distribution.
- _[cds4j@1.33.0]_ Support comparing structured elements in where, byId and matching
- _[cds4j@1.33.0]_ Add entity-level annotation `@cds.search.mode: 'localized-view'` to use `LIKE` on the entity or localized view in the generated SQL query.
- _[cds-mtxs@1.3.2]_ `cds.requires['cds.xt.SaasProvisioningService'].jobs.clusterPoolSize` allows you to specify the number of concurrent HANA Cloud cluster tenant upgrades.
- _[cds-mtxs@1.3.2]_ `cds.requires['cds.xt.DeploymentService'].hdi.create.binding_parameters` now also works with the built-in Service Manager client.

### Changed {#nov-22-changed}

- _[cds-dk@6.3.1]_ `cds init` uses latest Maven Java archetype version 1.29.0 for creating Java projects.
- _[cds-dk@6.3.1]_ Use `@sap/cds` 6.3.1
- _[cds-dk@6.3.1]_ Use `@sap/cds-mtxs` 1.3.1
- _[cds-dk@6.3.0]_ `cds add` support for classic Java projects is now removed.
- _[cds-dk@6.3.0]_ `cds import` now adds the annotation `@cds.external` for all the definitions in the CSN along with the service.
- _[cds-dk@6.3.0]_ `cds import` now adds `notNull` entry for all the parameters and properties in the CSN.
- _[cds-dk@6.3.0]_ MTX Client now trims a passcode entered via prompt for convenience when pasting
- _[cds.java@1.29.0]_ The `cds-services-archetype` generates a new CAP Java projects with a configured `@sap/cds-dk` version `6.3.0` which provides H2 support for version 2.x.
- _[cds.java@1.29.0]_ The goal `install-cdsdk` of the `cds-maven-plugin` requires a `@sap/cds-dk` version configured, the parameter `version` is mandatory now. A default value is not provided anymore and the Maven build will fail without this parameter.
- _[cds-mtxs@1.3.2]_ Error handling for the built-in Service Manager client is improved.
- _[cds-mtxs@1.3.1]_ `cds.requires.multitenancy.for` settings have been moved to `cds.requires['cds.xt.DeploymentService'].for`.

### Fixed {#nov-22-fixed}

- _[cds-dk@6.3.0]_ MTX Client now ignores a username potentially saved for the current project, if a passcode is given
- _[cds-dk@6.3.0]_ MTX Client now treats keytar as optional unless explicitly running `cds login`
- _[cds-dk@6.3.0]_ `cds import` now captures the documentation properly for all the EntitySet referring to same EntityType.
- _[cds-dk@6.3.0]_ `cds deploy --to sql` now produces 'plain' SQL again, suitable for e.g. H2.  In 6.2 it produced 'sqlite' dialect, erroneously.
- _[cds-dk@6.3.0]_ `cds compile --to openapi` now fixes the duplication of fields in `required` section.
- _[cds-dk@6.3.0]_ `cds lint` now recognizes ESLint configurations from _package.json_.
- _[vscode-cds@6.3.0]_ fix various axios related bugs
- _[vscode-cds@6.3.0]_ formatting of extensions with selectItems
- _[vscode-cds@6.3.0]_ format-cds script didn't find .cdsprettier.json
- _[cds-compiler@3.4.4]_ compiler: CSN flavor `gensrc` (known as `xtended` in `@sap/cds`) lost annotations
  on enum values and projection columns.
- _[cds-compiler@3.4.2]_ Don't propagate `@cds.external` (The CDS Importer adds `@cds.external` for all
  imported definitions beginning with cds-dk@6.3.0, see CAP release log).
- _[cds-compiler@3.4.2]_ for.odata: Ignore all `@cds.external` definitions.
- _[cds-compiler@3.4.2]_ to.sql: For sql dialect `h2`, don't turn a Decimal with length 0 into a Decfloat.
- _[cds-compiler@3.4.2]_ Extending a projection with an aspect could result in incorrect auto-redirection.
- _[cds-compiler@3.4.2]_ Annotations of aspects were not properly propagated to projections under some order-specific circumstances.
- _[cds.java@1.29.1]_ The tenant's token issuer URL used to obtain tokens for auditing, is now correctly determined by the Audit Log Client library, avoiding NullPointerExceptions.
- _[cds.java@1.29.1]_ Fixed a bug that caused Deploy main method to return with an error in case several tenants are updated and streamlined MTX is configured.
- _[cds.java@1.29.1]_ Fixed a bug that caused the drafts of entities with etags not to be canceled when the active entity was deleted.
- _[cds.java@1.29.1]_ Fixed a bug that caused access to a recycled HttpServletRequest, when accessing the Request Context in an asynchronous thread.
- _[cds.java@1.29.0]_ Fixed a bug causing `not null` validation errors on action and function parameters to directly throw a `ServiceException` instead of being collected into the list of error messages.
- _[cds4j@1.33.0]_ Fixed handling of an unrecognized query definition, when modeling an unmanaged association in a service entity.
- _[cds4j@1.33.0]_ Fixed handling of values of type `java.lang.Short` mapped to `cds.UInt8` and `cds.Int16` in `CdsTypeUtils`.
- _[cds4j@1.33.0]_ Fixed a bug that triggered exception `CdsElementNotFoundException` during search on entities that are projections or views on entities annotated with `@cds.search` with searchable elements excluded.
- _[cds@6.3.2]_ `cds deploy` reports errors correctly
- _[cds@6.3.2]_ Reference resolution in QL API
- _[cds@6.3.2]_ `cds.parse.path` to correctly handle special characters
- _[cds@6.3.2]_ `cds build` issues on Windows: build with large number of files and build on Git Bash.
- _[cds@6.3.2]_ `odata` as default protocol for enabled middlewares feature
- _[cds@6.3.1]_ `cds build` no longer reports false positive validation errors for built-in MTX models like `@sap/cds/srv/mtx` or `@sap/cds-mtxs/srv/bootstrap`
- _[cds@6.3.1]_ `cds deploy` handles empty result from `cf` call correctly
- _[cds@6.3.1]_ `$search` fails on columns composed by a CQL expression that uses the SAP HANA `coalesce` predicate
- _[cds@6.3.1]_ Draft ownership was erroneously checked for bound actions on active instances
- _[cds@6.3.1]_ `cds watch/run/serve --with-mocks` no longer start randomly with missing mocked services.  This could happen if previous runs crashed with errors and left bad state in the local service registry.
- _[cds-mtx@2.6.4]_ Full tenant metadata is stored again when running the subscription from CAP java
- _[cds-mtx@2.6.4]_ APIs can now be run without express app
- _[cds-mtx@2.6.4]_ Improved filter for technical tenants when getting all tenant ids
- _[cds-mtxs@1.3.2]_ `cds-mtx` commands now exit the process correctly.
- _[cds-odata-v2-adapter-proxy@1.9.15]_ Keep `ID__` parameter as query option for bound action/function on analytical entities
- _[cds-odata-v2-adapter-proxy@1.9.15]_ Remove introduced query option `select` for bound action calls on analytical entities again
- _[cds-odata-v2-adapter-proxy@1.9.14]_ Provide `value` section of `ID__` aggregation key as query option `select` to bound action handler
- _[cds-odata-v2-adapter-proxy@1.9.14]_ Accept aggregation annotations in lowercase and uppercase writing
- _[cds-odata-v2-adapter-proxy@1.9.14]_ Support `@Aggregation.ReferenceElement` and `@Aggregation.Reference` annotations to perform aggregation on different element
- _[cds-odata-v2-adapter-proxy@1.9.14]_ Only a single aggregation reference element is supported, specified as array with single element, e.g. `['element']`
- _[cds-odata-v2-adapter-proxy@1.9.14]_ Cast aggregation values of `#COUNT_DISTINCT` to `Integer` type to be represented as number (not as string), if typed accordingly
- _[cds-odata-v2-adapter-proxy@1.9.14]_ Map default aggregation `#COUNT` to virtual property `$count` of `$apply`
- _[cds-odata-v2-adapter-proxy@1.9.14]_ Remove unneeded temporary aggregation `$COUNT`. Use `#COUNT` instead.
- _[cds-odata-v2-adapter-proxy@1.9.13]_ Escape entity key value for bound action key parameter mapping
- _[cds-odata-v2-adapter-proxy@1.9.13]_ Support action parameters that overload bound entity key names
- _[cds-odata-v2-adapter-proxy@1.9.13]_ Support action/function on analytical entities via `ID__` aggregation key
- _[cds-odata-v2-adapter-proxy@1.9.12]_ Fix `$metadata` lookup with query options
- _[cds-odata-v2-adapter-proxy@1.9.11]_ Support new CDS integer types
- _[cds-odata-v2-adapter-proxy@1.9.11]_ Fallback target `auto` to `default` target until dynamic `target/port` assignment is available
- _[cds-odata-v2-adapter-proxy@1.9.11]_ Prevent loading OData V4 `$metadata` when OData V2 `$metadata` is requested
- _[cds-odata-v2-adapter-proxy@1.9.11]_ Fix draft requests re-write for `$filter`
- _[cds-odata-v2-adapter-proxy@1.9.11]_ Proxy option to disable `x-forwarded` header processing (`processForwardedHeaders: false`)

## October 2022

### Added {#oct-22-added}

- _[cds-dk@6.2.2]_ `cds deploy --to postgres --dry` to create drop/create DDL for PostgreSQL. Full deployment (w/o `--dry`) is not yet supported, though.
- _[cds-dk@6.2.0]_ `cds import` now imports Singleton entities for OData V4 files.
- _[cds-dk@6.2.0]_ `cds deploy` now supports the new default`.sqlite` file ending
- _[cds-dk@6.2.0]_ `cds add mta` no longer creates a `before-all` custom build command for Java single and multi tenant applications. Custom build commands are defined for `db-deployer` and `mtx/sidecar` modules instead.
- _[cds-dk@6.2.0]_ `cds import` now supports enum types for OData V4
- _[cds-dk@6.2.0]_ `cds add enterprise-messaging` can be now be used to set up configuration and deployment descriptors for SAP Event Mesh.
- _[cds-dk@6.2.0]_ `cds add` now throws an error if no facet is passed.
- _[cds-dk@6.2.0]_ `cds watch` now also considers more files from SAP Fiori (`change,variant,ctrl_variant,ctrl_variant_change,ctrl_variant_management_change`)
- _[cds-compiler@3.4.0]_ to.sql: Add support for sql dialect `h2`, which renders SQL for H2 2.x
- _[cds.java@1.28.0]_ CSV files with strings quoted with `"`, escaped characters and tabs as the delimiters are now supported.
- _[cds.java@1.28.0]_ The `UserInfo` resulting from IAS-based authentication now contains all (custom) attributes from the ID token.
- _[cds.java@1.28.0]_ Using streamlined MTX (configured multitenancy sidecar with `@sap/cds-mtxs`) it is now possible to use the SQLite files created by it as a tenant databases when your CAP application is executed locally.
- _[cds.java@1.28.0]_ Validation annotations `@mandatory`, `@assert.format` and `@assert.range` and the `not null` constraint are verified on parameters of actions and functions. The validations can be disabled with configuration option `cds.query.validation.parameters.enabled` set to `false`.
- _[cds.java@1.28.0]_ `CdsThreadContextDecorator` that ensures CDS request context propagation to async callables executed by CloudSDK's `ThreadContextExecutorService` with CloudSDK 4.
- _[cds4j@1.32.0]_ PostgreSQL: use session config variables to support localized views and temporal data
- _[cds@6.3.0]_ Additional type signatures for service methods in the query API
- _[cds@6.3.0]_ In case of error in a batch request, the @Core.ContentID is added to the details of the error message
- _[cds@6.3.0]_ Extensibility: Use i18n files from extensions in edmx calculation
- _[cds@6.3.0]_ In messaging, you can listen to all messages in a queue by subscribing to `'*'`
- _[cds@6.3.0]_ Improved Log formatting for Cloud Foundry
- _[cds@6.3.0]_ In remote services: Correct OData type conversion when using an imported csn
- _[cds@6.3.0]_ Types for `SELECT.forUpdate({wait})`
- _[cds@6.3.0]_ `cds.ql` now provides a dedicated method `.alias()` to choose table aliases, e.g.:

  ```js
  SELECT.from(Authors).alias(a)
  ```

  > Note: unfortunately we can't use method `.as()` instead of `.alias()` for compatibility reasons
- _[cds@6.3.0]_ `cds.ql` now supports constructing queries with `where exists` clauses, e.g.:

  ```js
  SELECT.from(Authors).where({exists:'books'})
  SELECT.from(Authors).where({'not exists':'books'})
  SELECT.from(Authors).alias('a').where({ exists: // or 'not exists'
    SELECT.from(Books).where({author_ID:{ref:['a','ID']}})
  })
  ```

  > Note: last query is equivalent to first
- _[cds@6.3.0]_ `cds compile` and `cds deploy` now also support dialect `h2`
- _[cds@6.3.0]_ New (easier) `jwt` and `xsuaa` authentication middleware for pluggable middlewares
- _[cds@6.2.0]_ Types for using tagged template variants of several CQL constructs
- _[cds@6.2.0]_ Types for calling shortcut versions of CQL constructs (`SELECT(...)` in addition to `SELECT.from(...)`, etc.)
- _[cds@6.2.0]_ Types for `cds.test`
- _[cds@6.2.0]_ Types for `cds.log().setFormat()`
- _[cds@6.2.0]_ Support for `redis-messaging` <Beta />
- _[cds@6.2.0]_ Log the cds version when starting the server
- _[cds@6.2.0]_ Support for non-root entities as the main draft entity
- _[cds@6.2.0]_ Support for IAS authentication using kind `ias-auth`
- _[cds@6.2.0]_ Warning if multiple installations of `@sap/cds` were found when serving requests
- _[cds@6.2.0]_ Wildcard expansion `('*')` of properties in QL is now typed
- _[cds@6.2.0]_ Support for extended models in custom transactions and background processes
- _[cds@6.2.0]_ `cds build` logs detailed error messages if required service models cannot be resolved or aren't defined in custom build tasks.
- _[cds@6.2.0]_ Support for additional data types `cds.UInt8`, `cds.Int16`, `cds.Int32`, `cds.Int64`
- _[cds@6.2.0]_ Typings for `cds.utils`, `req.entity`
- _[cds@6.2.0]_ Optimized server startup for projects with large models and high numbers of services.
  Can be switched off by setting config `cds.features.precompile_edms = false` in case of problems.
- _[cds@6.2.0]_ Set default header to `application/octet-stream` while sending binary to remote
- _[cds@6.2.0]_ OData temporal query params `$at`, `$from`, `$to`, `$toInclusive` can be used in custom handlers
- _[cds@6.2.0]_ Reserved keywords from compiler api available at `cds.compile.to.[cdl, sql.sqlite]`
- _[cds@6.2.0]_ Improved `winston` integration in `cds.log`
- _[cds-graphql@1.2.0]_ Support for CDS types `cds.UInt8`, `cds.Int16`, `cds.Int32` and `cds.Int64`
- _[cds-graphql@1.2.0]_ Map `cds.Binary` and `cds.LargeBinary` to new custom `Binary` scalar type that uses strings to represent base64url encoded binary values
- _[cds-graphql@1.2.0]_ Map `cds.Date` to new custom `Date` scalar type that uses strings to represent date values in the ISO 8601 format `YYYY-MM-DD`
- _[cds-graphql@1.2.0]_ Map `cds.DateTime` to new custom `DateTime` scalar type that uses strings to represents datetime values in the ISO 8601 format `YYYY-MM-DDThh-mm-ssTZD`
- _[cds-graphql@1.2.0]_ Map `cds.Decimal` to new custom `Decimal` scalar type that uses strings to represent exacted signed decimal values
- _[cds-graphql@1.2.0]_ Map `cds.Int16` to new custom `Int16` scalar type that represents 16-bit signed integer values
- _[cds-graphql@1.2.0]_ Map `cds.Int32` to the GraphQL built-in scalar type `Int`
- _[cds-graphql@1.2.0]_ Map `cds.Integer64` and `cds.Int64` to new custom `Int64` scalar type that uses strings to represent 64-bit signed integer values
- _[cds-graphql@1.2.0]_ Map `cds.Time` to new custom `Time` scalar type that uses strings to represent time values in the ISO 8601 format `hh:mm:ss`
- _[cds-graphql@1.2.0]_ Map `cds.Timestamp` to new custom `Timestamp` scalar type that uses strings to represents timestamp values in the ISO 8601 format `YYYY-MM-DDThh-mm-ss.sTZD` with up to 7 digits of fractional seconds
- _[cds-graphql@1.2.0]_ Map `cds.UInt8` to new custom `UInt8` scalar type that represents 8-bit unsigned integer values
- _[cds-mtxs@1.3.0]_ `cds.requires.multitenancy.for` lets you define tenant-specific creation and deployment configuration.
  - For example: parameters for `t0` onboarding can be specified via `cds.requires.multitenancy.for.t0`. Analogous to the configuration in `cds.xt.DeploymentService` you can specify options for `create` and `deploy`.
- _[cds-mtxs@1.3.0]_ `cds.xt.DeploymentService`: The `t0` tenant is now onboarded on startup.
- _[cds-mtxs@1.3.0]_ `POST /-/cds/deployment/subscribe` saves onboarding metadata in `t0`.
- _[cds-mtxs@1.3.0]_ `POST /-/cds/deployment/unsubscribe` removes onboarding metadata for `t0`.
- _[cds-mtxs@1.3.0]_ [BETA] Command line tool `cds-mtx` now also allows to run `upgrade` in an application environment, e. g. `npx cds-mtx upgrade tenant1` or `cds-mtx upgrade tenant1` if you have installed `@sap/cds-mtxs` globally. This redeploys the current application model. Potential service handlers can be registered in `cli.js` (`server.js` is not loaded)
- _[cds-mtxs@1.2.0]_ `cds.xt.DeploymentService`: Additional parameters for HDI deployment (`@sap/hdi-deploy`) can now be added via the subscription request or the `cds` environment.
Via additional parameter in the subscription payload:

```json
{
  "tenant": "tenant",
  "_": {
    "hdi": {
      "deploy": {
        "auto_undeploy": "true"
      }
    }
  }
}
```

Via `cds` environment:

```json
...
"cds": {
  "requires": {
    "cds.xt.DeploymentService": {
      "hdi": {
        "deploy": {
          "auto_undeploy": "true"
        }
      }
    }
  }
}
```

- _[cds-mtxs@1.2.0]_ `PUT /-/cds/saas-provisioning/tenant/<tenantId>` saves subscription metadata.
- _[cds-mtxs@1.2.0]_ `GET /-/cds/saas-provisioning/tenant/<tenantId>` returns the saved tenant metadata for `<tenantId>`.
- _[cds-mtxs@1.2.0]_ `GET /-/cds/saas-provisioning/tenant` returns the saved tenant metadata for all tenants.
- _[cds-mtxs@1.2.0]_ `GET /-/cds/deployment/getTables(tenant='<tenantId>)` returns all deployed tables for a tenant.
- _[cds-mtxs@1.2.0]_ [BETA] Command line tool `cds-mtx` allows to run `subscribe and unsubscribe` in an application environment, e. g. `npx cds-mtx subscribe tenant1` or `cds-mtx subscribe tenant1` if you have installed `@sap/cds-mtxs` globally

### Changed {#oct-22-changed}

- _[cds-dk@6.2.3]_ Use `@sap/cds` 6.2.3
- _[cds-dk@6.2.3]_ Use `@sap/hdi-deploy` 4.5.0, which brings support for Node 18
- _[cds-dk@6.2.0]_ `cds add data` no longer creates CSV headers in UPPERCASE, but keeps the original case of the declared element.  Both styles work, but the latter is preferred.
- _[cds-dk@6.2.0]_ `cds pull` requires `@sap/cds` 6.2 or higher
- _[cds.java@1.28.0]_ UUID keys and `@cds.on.insert` values are not generated for `Upsert` anymore. Key values need to be included in the upsert data, otherwise use `Insert`. `@cds.on.insert` values can be given in the upsert data, but are not added automatically anymore, to not overwrite them in case the entity already exists on the database. The legacy behavior can be enabled with configuration option `cds.sql.upsert.strategy` set to `replace`.
- _[cds4j@1.32.0]_ Removed any normalization of incoming locales. In standard CAP Java use cases (cds4j is called by cds-services) the
  locales are normalized by inbound adapters e.g. the OData adapters as defined [here](https://cap.cloud.sap/docs/guides/uis/i18n#normalized-locales).
  Other components consuming CDS4j must handle locale normalization as part of the client code.
- _[cds4j@1.32.0]_ Upsert: Use DB upserts instead of delete & insert and execute deep to-one upserts w/o selecting the target entity. Note that this optimization leads to orphans if the key value of an entity in a to-one composition is changed. The legacy behavior can be enabled with configuration option `cds.sql.upsert.strategy` set to `replace`.
- _[cds4j@1.32.0]_ use ILIKE operator for search on H2 and PostgreSQL
- _[cds@6.3.0]_ In `enterprise-messaging`, emitting CloudEvents messages sets the HTTP header `Content-Type: application/cloudevents+json`
- _[cds@6.3.0]_ Added type definition for `cds.User`
- _[cds@6.2.0]_ `cds.debug()` now returns undefined instead of falsy if debug is switched off. This allows usages like that:

  ```js
  const DEBUG = cds.debug('whatever')
  DEBUG?.(...)
  ```

- _[cds@6.2.0]_ All MTX-related modules have been refactored and moved to `@sap/cds-mtxs`.
  Ensure to also upgrade to latest version of `@sap/cds-mtxs` when upgrading `@sap/cds` to avoid any breaking change effects.
- _[cds@6.2.0]_ SQLite database file endings have been changed to `.sqlite`, so third-party tools (e.g. VS Code extensions) can deduce the file type.
- _[cds@6.2.0]_ Method `disconnect()` in db services empties db pool w/o removing db services. In special cases (like tests) cleaning-up db service should be done manually while deleting `cds.services.db` and `cds.db`.
- _[cds@6.2.0]_ Prefer HANA driver that is required in package.json of project root
- _[cds-mtx@2.6.3]_ `polling_interval_millis` set for `@sap/instance-manager` has been increased to `3000`
- _[cds-graphql@1.2.0]_ Don't generate fields that represent compositions of aspects within types that represent services
- _[cds-graphql@1.2.0]_ Map `cds.Double` to GraphQL `Float` scalar type as it is capable of signed double‐precision
- _[cds-mtxs@1.3.0]_ `@sap/instance-manager` has been replaced by a custom Service Manager client, which is now the default. You can switch back to the `@sap/instance-manager`-based client by setting `cds.requires['cds.xt.DeploymentService']['old-instance-manager']` to `true`.
- _[cds-mtxs@1.2.0]_ `@sap/cds-mtxs@1.2.0` requires `@sap/cds@6.2`
- _[cds-mtxs@1.2.0]_ `POST /-/cds/saas-provisioning/upgrade` accepts a list of tenants like `upgrade(['t1', 't2'])`.
  - `upgrade(['*'])` upgrades all tenants.
- _[cds-mtxs@1.2.0]_ `POST /-/cds/saas-provisioning/upgrade` gets its tenants from the `t0` cache instead of the `saas-registry` service.
- _[cds-mtxs@1.2.0]_ `POST /-/cds/saas-provisioning/upgradeAll` has been deprecated and will be removed.
- _[cds-mtxs@1.2.0]_ `POST /-/cds/deployment/unsubscribe` is now idempotent for HANA as well.
- _[cds-mtxs@1.2.0]_ Polling interval to service-manager in `@sap/instance-manager` options has been increased to reduce rate-limiting problems.

### Fixed {#oct-22-fixed}

- _[cds-dk@6.2.3]_ `cds mock` now prefers a local `@sap/cds` installation, like other `cds` commands as well.
- _[cds-dk@6.2.2]_ `cds deploy --to sql` now honors the `cds.sql.dialect` configuration to specify SQL dialects like `postgres`.
- _[cds-dk@6.2.1]_ Installation errors with unresolvable `@sap/hdi` 4.4.0 are fixed.
- _[cds-dk@6.2.0]_ `cds import` now imports csn for OData V2 file even if the `association set` is missing and throws error if the corresponding `association` is missing.
- _[cds-dk@6.2.0]_ `cds import` now adds the annotation `@odata.Precision` entry only if precision > 0 for Edm.DateTime and Edm.DateTimeOffset.
- _[cds-dk@6.2.0]_ `cds compile --to openapi` now has schema Objects for `-create` and `-update` to only advertise "deep" insert/update for _containment_ navigation properties. Non-containment navigation properties are no longer mentioned.
- _[cds-dk@6.2.0]_ `.sqlite` files are now git-ignored in new projects created with `cds init`
- _[cds-dk@6.2.0]_ `cds compile --to openapi` now fixes the issue of failing range assertions for an element having undefined maximum and minimum range values.
- _[cds-dk@6.2.0]_ `cds import` now for OData V2 files doesn't throw warning for `EntityType` being referred as type in complex types, functions and actions, provided it is present in the file.
- _[vscode-cds@6.2.1]_ syntax highlighting of comments
- _[cds-compiler@3.4.0]_ Properly report an error for bare `$self` references,
  except in the `on` condition of unmanaged associations.
- _[cds-compiler@3.4.0]_ Do not dump with references to CDS variables like `$now` in `expand`/`inline`.
- _[cds-compiler@3.4.0]_ Properly report an error when trying to `cast` a column to an association.
- _[cds-compiler@3.4.0]_ to.cdl: Identifiers that are always keywords in special functions are now escaped.
- _[cds-compiler@3.4.0]_ to.edm(x):
  - Nested annotation was not applied if outer annotation has value zero.
  - Fix `AppliesTo=ComplexType, TypeDefinition` term definition directive.
- _[cds-compiler@3.4.0]_ to.sql/hdi/hdbcds:
  - Properly report an error for `exists` with `$self.managed-association`
  - For sql dialect `hana`, add an implicit alias when using `:param` in the select list
  - Handle `$self` and magic variables during expansion of nested projections
- _[cds.java@1.28.1]_ Fixed a bug in draft handling which could prevent insertion of child entity instances via an unmanaged composition in case the parent entity has multiple compositions to the child entity.
- _[cds.java@1.28.1]_ Fixed a bug that caused the Java CAP application not to find a service binding via its service name property in case it also bears custom tags.
- _[cds.java@1.28.1]_ Fixed a bug that caused the results of a `Select` statement for draft-enabled entities with an ordering condition to be ordered by wrong field, for example, by own field instead of a field of the association.
- _[cds.java@1.28.1]_ SQLite filenames `db-[tenant].sqlite` generated by configured multitenancy sidecar with `@sap/cds-mtxs` are recognized when your CAP application is executed locally.
- _[cds.java@1.28.1]_ Fixed a bug that caused `URISyntaxException` to be thrown during access to an entities with keys that must be encoded in the URL, for example, dates and times.
- _[cds.java@1.28.0]_ Fixed a bug, causing properties passed to `@Transactional` to be ignored when using propagation `REQUIRED`, even though a new transaction is started.
- _[cds.java@1.28.0]_ Fixed a bug, causing data loss for OData v2 `Edm.DateTime` properties without `sap:display-format: 'Date'`.
- _[cds.java@1.28.0]_ Draft GC will no longer display full stack of an exception if it executed for the offboarded tenant.
- _[cds.java@1.28.0]_ Fixed a gap in OData V2 which caused search texts with non-ascii-characters to be rejected.
- _[cds.java@1.28.0]_ Fixed a bug in the CDS Maven plugin letting the build fail in case of a missing node.js installation even if the CDS build should be skipped by configuration.
- _[cds.java@1.28.0]_ Fixed a bug in OData V2, causing error messages to display the name of the exception class and generic text instead of the actual error message.
- _[cds.java@1.28.0]_ Fixed a bug in OData V2, that produces an error message about "content-type `text/plain` not being acceptable" whenever a request using `count` or `value` parameter runs into an error
- _[cds.java@1.28.0]_ Fixed a bug that caused to omit custom HANA service instance options during onboarding of new SaaS tenants.
- _[cds.java@1.28.0]_ Fixed a bug that the health check reported that no DB schema for a test is available
- _[cds.java@1.28.0]_ Fixed a bug that caused the OData V2 adapter to return internal error messages with technical details on JSON deserialization issues. The details will only appear in the application log now.
- _[cds.java@1.28.0]_ Fixed a bug that prevented to shutdown the JVM gracefully due to a hanging background thread in case of MT scenario.
- _[cds4j@1.32.1]_ Fixed performance issue caused by subqueries in to-many expands, make `INNER JOIN` the default expand method.
- _[cds4j@1.32.0]_ Code generator: Fix handling of entities with dots in their name outside of a CDS context
- _[cds4j@1.32.0]_ Fixed unrelated exception when searching, if `cds.sql.search.use-localized-view` is enabled and no locale is given.
- _[cds@6.3.0]_ Change signature of cqn `SELECT.limit.offset` and `SELECT.limit.rows` to `val` instead of `number`
- _[cds@6.3.0]_ Parsing of store procedure SQL calls including the schema name. For example, `CALL "SCHEMA"."PROC"(?)` and `CALL SCHEMA.PROC(?)`
- _[cds@6.3.0]_ Add property name in the error message on validation of the value
- _[cds@6.3.0]_ Kibana and Cloud Foundry formatter: do not log cookie header value
- _[cds@6.3.0]_ Missing SQL aliases for `$search` queries combined with `$orderBy` query option
- _[cds@6.3.0]_ The return value of `cds.connect` is now correctly typed as a `Promise`
- _[cds@6.3.0]_ `req.data` is no longer modified for remote services in the case of `odata-v2` inserts
- _[cds@6.3.0]_ `cds.localize` no longer ignores i18n files defined within CDS model scope and outside project scope
- _[cds@6.3.0]_ Don't modify query in `fioriGenericRead` handler
- _[cds@6.2.3]_ New continuation for incoming messages
- _[cds@6.2.3]_ `cds.test` no longer fails if used in ESM modules with `mocha` (`ERR_REQUIRE_ESM` error)
- _[cds@6.2.3]_ Collection-bound actions/functions don't need draft ownership check
- _[cds@6.2.2]_ Fix environment variable `OLD_MTX`, allowing `cds build` to create artifacts for classic `@sap/cds-mtx` library
- _[cds@6.2.1]_ In the CDS configuration, custom profiles now have precedence over the (implicit) default `[development]` profile, irrespective of insertion order.
- _[cds@6.2.1]_ `cds test` is now compatible with new `axios` 1.x
- _[cds@6.2.0]_ Queries like `SELECT.from(Foo).where({a:1}).or({b:2}).and({c:3})` erroneously resulted in `SELECT from Foo where (a=1 or b=2) and c=3`
- _[cds@6.2.0]_ Signatures for QN `order_by` expressions are now in line with the capire doc
- _[cds@6.2.0]_ Signatures for QL operations are now more specific
- _[cds@6.2.0]_ `basic-auth` does not inherit users of `mocked-auth`
- _[cds@6.2.0]_ `cds.localize` now ignores i18n files defined outside project scope.
- _[cds@6.2.0]_ Allow `@Capabilities.NavigationRestrictions.RestrictedProperties` to be specified in the format `{ InsertRestrictions.Insertable: false }`
- _[cds@6.2.0]_ Bound actions/functions while calling remote service
- _[cds@6.2.0]_ `$search`: Search on localized projections/views does not always return the localized data
- _[cds@6.2.0]_ `cds push` now shows better output for failed extension validations
- _[cds@6.2.0]_ Aliased parameters in REST parser
- _[cds@6.2.0]_ `cds.deploy` now logs the correct filename for multitenant SQLite
- _[cds@6.2.0]_ HDI configuration data (e.g. `./cfg`, `.hdiignore`) and HANA native artifacts have not always been copied into the `sdc` folder of a MTX sidecar module
- _[cds@6.2.0]_ OData URL to CQN parser (`cds.env.features.odata_new_parser`) now supports functions with no arguments
- _[cds@6.2.0]_ Runtime exception for `PATCH` HTTP request with an empty payload body and read-only field
- _[cds@6.2.0]_ Streams in draft caused SQL error
- _[cds@6.2.0]_ Better response state handling during `cds deploy` to Cloud Foundry.
- _[cds@6.2.0]_ Draft: patch on draft enabled entity with a composition of one
- _[cds@6.2.0]_ Maximum stack trace exceeded in generic audit logging implementation
- _[cds@6.2.0]_ The protocol adapter logs the decoded URI or the original one, if it is invalid
- _[cds@6.2.0]_ REST: reject action calls with round brackets (parentheses). For example, the request `/Books(1)/bookShelf.CatalogService.rate()` is now rejected.
- _[cds@6.2.0]_ `cds deploy` and `cds run/serve/watch` no longer print terminal escape sequences (`x1b...`) if they run non-interactively.
- _[cds@6.2.0]_ Some fields in entities like `path` generated invalid sql
- _[cds-mtx@2.6.3]_ `.hdinamespace` files provided as native HANA content are now included for deployment
- _[cds-mtx@2.6.3]_ EDMX files are only generated for the default language if ad-hoc edmx compilation is enabled (`mtx.edmx.compile: true`)
- _[cds-graphql@1.2.0]_ Omit `filter` and `orderBy` for entities which don't contain fields
- _[cds-graphql@1.2.0]_ Don't generate fields for associations and compositions in `orderBy` input types
- _[cds-mtxs@1.3.0]_ `/-/cds/saas-provisioning/upgrade` now also runs with DwC
- _[cds-odata-v2-adapter-proxy@1.9.10]_ Atom format fixes
- _[cds-odata-v2-adapter-proxy@1.9.10]_ Trim spaces for filter function parameter transformations
- _[cds-odata-v2-adapter-proxy@1.9.10]_ Allow passing proxy options as command line env (`camelCase` to `snake_case`, escape `_` by doubling)

### Removed {#oct-22-removed}

- _[cds-dk@6.2.2]_ `cds add notebook` removed in favor of custom notebooks in VS Code (now part of the CDS Editor)

## September 2022

### Added {#sep-22-added}

- _[eslint-plugin-cds@2.6.0]_ New `extension-restrictions` rule that validates extension projects' models against restrictions set by the extended SaaS app.
- _[vscode-cds@6.2.0]_ document link resolution of 'folder' using paths to csn index files
- _[vscode-cds@6.2.0]_ new formatting options `keepPreAnnotationsInOriginalLine` and `keepPostAnnotationsInOriginalLine`
- _[vscode-cds@6.2.0]_ auto-exposed entities are now included in semantic Outline (user setting)
- _[vscode-cds@6.2.0]_ code completion for annotations on auto-exposed entities
- _[cds-compiler@3.3.0]_ Nested projections can be used without `beta` option:
  - Support `expand`: columns can look like `assoc_or_struct_or_tabalias { col_expression1, … }`,
    `longer.ref as name { *, … } excluding { … }`, `{ col_expression1 as sub1, … } as name`, etc.
  - Support `inline`: columns can look like `assoc_or_struct_or_tabalias.{ col_expression1, … }`,
    `longer.ref[filter = condition].{ *, … } excluding { … }`, `assoc_or_struct_or_tabalias.*`, etc.
- _[cds-compiler@3.3.0]_ to.sql/hdi/hdbcds/edm(x)/for.odata: Allow to structure comparison against `is [not] null`.
- _[cds-compiler@3.3.0]_ to.sql: Support dialect `postgres` - generates SQL intended for PostgreSQL. Not supported are `cds.hana` data types and views with parameters.
- _[cds@6.1.3]_ Configuration to change maximum body size in bytes for remote requests: `cds.env.remote.max_body_length: 1000` sets it to 1 MB
- _[cds-mtx@2.6.2]_ Retries can now be configured with a delay (in ms)

  ```json
  "mtx": {
     "provisioning": { "retryDelay": 1000 }
  }
  ```

- _[cds-mtx@2.6.2]_ Clustering of upgrade jobs by database id can be disabled to reduce service-manager workload

  ```json
  "mtx": {
      "jobs": {
        "clusterbydb": false
      },
      ...
  }
  ```

### Changed {#sep-22-changed}

- _[eslint-plugin-cds@2.6.0]_ Renamed rule `no-join-on-draft-enabled-entities` to `no-join-on-draft`.
- _[eslint-plugin-cds@2.6.0]_ Expanded list of reserved keywords to check for in rule `no-db-keywords`.
- _[vscode-cds@6.2.0]_ improved Java compatibility of TextMate grammar
- _[cds-compiler@3.3.0]_ A valid redirection target does not depend on parameters anymore.  This
  change could induce a redirection error, which could easily solved by assigning
  `@cds.redirection.target: false` to the entity with “non-matching” parameters.
- _[cds-compiler@3.3.0]_ Properly issue an error when projecting associations with parameter
  references in the `on` condition.  Before this change, the compiler dumped
  when projecting such an association in a view on top.
- _[cds-compiler@3.3.0]_ Update OData vocabularies 'Capabilities', 'Common', 'UI'.
- _[cds-compiler@3.3.0]_ to.cdl:
  - Extensions are now always put into property `model` of `to.cdl()`s result.
  - Actions on views and projections are now rendered as part of the definition, instead of an extension.
- _[cds-compiler@3.3.0]_ to.edm(x): `@Capabilities` 'pull up' supports all counterpart properties of `@Capabilities.NavigationPropertyRestriction`
  except for properties `NavigationProperty` and `Navigability`.
- _[cds-compiler@3.3.0]_ to.hdi: Updated list of `keywords` which must be quoted in naming mode `plain`.
- _[cds-compiler@3.3.0]_ to.sql/hdi/hdbcds/edm(x)/for.odata: Reject structure comparison with operators `<,>,<=,>=`. Message id `expr-unexpected-operator`
  is downgradable to a warning.
- _[cds@6.1.3]_ For structured input, foreign keys are generated as non-enumerable properties on application-service layer

### Fixed {#sep-22-fixed}

- _[cds-dk@6.1.5]_ `cds build` no longer erroneously warns about old `@sap/cds` versions.  Previously, it warned about `@sap/cds` 4 although a newer version was installed.
- _[cds-dk@6.1.4]_ `cds build` now works again with `@sap/cds` version 4.  Previously, this silently failed with no output.  However, a warning is now emitted that strongly recommends an upgrade to version 6.
- _[cds-dk@6.1.3]_ `cds import` now gives higher precedence to complex type in case of name collision with actions or functions.
- _[cds-dk@6.1.3]_ `cds extend` and other commands no longer fail with `TypeError: Class constructor CliError cannot be invoked without 'new'`
- _[eslint-plugin-cds@2.6.0]_ Errors from rules are shown again in the console output
- _[vscode-cds@6.2.0]_ fixed syntax highlighting for `extend`, attribute names, type structs, and some keywords
- _[vscode-cds@6.2.0]_ fixed formatting of bracketed expressions and annotations standing in their own lines
- _[vscode-cds@6.2.0]_ fixed alignment of multiple annotations per line
- _[cds-compiler@3.3.2]_ to.edm(x): Set `Scale` (V4) or `@sap:variable-scale` (V2) attributes correctly when overwriting `cds.Decimal`
  with `@odata.Scale`.
- _[cds-compiler@3.3.2]_ to.sql: For dialect `postgres`, add braces around `$now`, `$at.from` and `$at.to`.
- _[cds-compiler@3.3.0]_ Do not issue a warning anymore when adding elements via multiple `extend` statements in the same file.
- _[cds-compiler@3.3.0]_ An info message for annotating builtins through `extend` statements is now reported, similar to `annotate`.
- _[cds-compiler@3.3.0]_ Fix auto-redirection for target of new assoc in query entity
- _[cds-compiler@3.3.0]_ for.odata: `@readonly/insertonly/mandatory: false` are not expanded.
- _[cds.java@1.27.3]_ Fixed a bug, causing custom handlers of `MtSubscriptionService` not being called when running the application with the `Deploy` class.
- _[cds.java@1.27.3]_ Fixed a bug, causing `The URI is malformed` Exception when applying alpha-numeric `$search` in `$expand`, e.g. `Books(1)?$expand=author($search=A3B)`.
- _[cds.java@1.27.3]_ Fixed an exception when using an EXISTS predicate in infix filter of expand.
- _[cds.java@1.27.2]_ Fixed a bug, causing OData V2 search queries including URL-encoded non-ASCII characters to fail.
- _[cds.java@1.27.2]_ Automatic refresh of service manager cache in instance manager client lib.
- _[cds4j@1.31.2]_ Fix exception when using an EXISTS predicate in infix filter of expand
- _[cds4j@1.31.1]_ Fix NPE in deep insert with null valued structured elements
- _[cds4j@1.31.1]_ Fix exception on updates with empty entries list
- _[cds@6.1.3]_ Deep insert/update/upsert requests where the key of an association is provided in a structured format will not be rejected anymore if the target has default or mandatory fields
- _[cds@6.1.3]_ For some configurations, mtxs services were bootstrapped twice
- _[cds@6.1.2]_ Missing key insertion from where clauses in references for deep update statements
- _[cds@6.1.2]_ Prevent duplicate entries for some `INSERT` statements
- _[cds@6.1.2]_ Log details were not properly displayed in Kibana
- _[cds@6.1.2]_ getCsn in model-provider if `cds.requires.toggles` is false
- _[cds@6.1.2]_ HTTP calls in messaging have the correct content length
- _[cds@6.1.2]_ Performance issue for OData `<entity>/$count` requests
- _[cds@6.1.2]_ Typescript definition for SQL-native variant of `srv.run`, like `srv.run('SELECT * from Authors where name like ?',['%Poe%'])`
- _[cds@6.1.2]_ Typescript definitions for `srv.run( [query] )` and `srv.send( {query, headers} )`
- _[cds@6.1.2]_ Typescript definitions for `cds.log` are improved, level indicators like `cds.log()._debug` added
- _[cds@6.1.2]_ Typescript definitions for `tx` now carry additional service methods
- _[cds@6.1.2]_ `cds login` now returns errors with a better root cause messages
- _[cds@6.1.2]_ `$expand` requests for to-one associations that do not select the foreign key
- _[cds@6.1.2]_ `UPDATE` statement accepts empty objects: `UPDATE('Foo').with({ bar: {} })`
- _[cds@6.1.2]_ URI encoding of parameters in remote service calls
- _[cds-mtx@2.6.2]_ Debug logs do no longer contain any authentication details
- _[cds-odata-v2-adapter-proxy@1.9.9]_ Fix logging layers and debug trace activation
- _[cds-odata-v2-adapter-proxy@1.9.9]_ Connect `cds.log` with `http-proxy-middleware`
- _[cds-odata-v2-adapter-proxy@1.9.8]_ Fix data type conversion for single attribute value responses (incl. $value)
- _[cds-odata-v2-adapter-proxy@1.9.8]_ Fix response mapping of parameters for `Parameters` entity
- _[cds-odata-v2-adapter-proxy@1.9.8]_ Respect `$format=json` for service root document
- _[cds-odata-v2-adapter-proxy@1.9.8]_ Introduce proxy options to specify OData default format (default is `json`)
- _[cds-odata-v2-adapter-proxy@1.9.8]_ `Atom (XML)` format support
- _[cds-odata-v2-adapter-proxy@1.9.7]_ Respect `$select` filter for `deferreds` structure
- _[cds-odata-v2-adapter-proxy@1.9.7]_ Fix definition lookup for service entities with scoped name
- _[cds-odata-v2-adapter-proxy@1.9.7]_ Fix definition lookup for unbound service operations (actions, functions) with scoped name
- _[cds-odata-v2-adapter-proxy@1.9.7]_ Improve Kibana logging even more
- _[cds-odata-v2-adapter-proxy@1.9.7]_ Use project specific logger
- _[cds-odata-v2-adapter-proxy@1.9.7]_ Document that option `fileUploadSizeLimit` only applies to uploads via `POST` using `multipart/form-data` requests
- _[cds-odata-v2-adapter-proxy@1.9.6]_ Improve Kibana logging
- _[cds-odata-v2-adapter-proxy@1.9.6]_ Improve error and warning logging messages
- _[cds-odata-v2-adapter-proxy@1.9.6]_ Make log level of `Changeset order deviation` configurable via `changesetDeviationLogLevel`. Default is now `'info'`.

### Removed {#sep-22-removed}

- _[vscode-cds@6.2.0]_ removed `cds watch` snippet
- _[vscode-cds@6.2.0]_ removed formatting option `keepAnnotationsInOriginalLine` (will be migrated to the new options when set in .cdsrc.json)

## August 2022

### Added {#aug-22-added}

- _[cds-dk@6.1.1]_ `cds import` now supports OData and SAP annotations for OData V4 imports.
- _[cds-dk@6.1.1]_ `cds compile --to openapi` defines operation-specific HTTP error response status codes with descriptions via `ErrorResponses` property of certain annotations.
- _[cds-dk@6.1.1]_ `cds compile --to openapi` now supports `--openapi:servers` option.
- _[cds-dk@6.1.1]_ `cds add multitenancy` will add feature multitenancy-specific configuration, without extensibility.
- _[cds-dk@6.1.1]_ `cds add toggles` will add feature toggle-specific configuration.
- _[cds-dk@6.1.1]_ `cds add extensibility` will add configuration for project extensibility.
- _[cds-dk@6.1.1]_ `cds add helm` now supports resource configuration for HANA deployment job and HTML5 app deployment job.
- _[cds-dk@6.1.1]_ `cds add helm` added JSON Schema for values.yaml
- _[cds-dk@6.1.1]_ `cds pull` will download the current CDS model of an extended SaaS app running with @sap/cds-mtxs.
- _[cds-dk@6.1.1]_ `cds push` will upload an extension to a SaaS app running with @sap/cds-mtxs.
- _[eslint-plugin-cds@2.5.0]_ Flavor in `model` property on `meta` object of rule
- _[eslint-plugin-cds@2.5.0]_ Context function `getNode()` returns Node with proper location
- _[vscode-cds@6.1.0]_ load cds based json schemas for `package.json`, `.cdsrc.json` and `.cdsrc-private.json` dynamically based on project's cds version
- _[cds-compiler@3.2.0]_ New Integer types with these mappings:

  | CDS       | OData     | SQL      | HANA CDS      |
  | --------- | --------- | -------- | ------------- |
  | cds.UInt8 | Edm.Byte  | TINYINT  | hana.TINYINT  |
  | cds.Int16 | Edm.Int16 | SMALLINT | hana.SMALLINT |
  | cds.Int32 | Edm.Int32 | INTEGER  | cds.Integer   |
  | cds.Int64 | Edm.Int64 | BIGINT   | cds.Integer64 |

- _[cds-compiler@3.2.0]_ Properties of type definitions and types of direct elements can now be extended,
  e.g. `extend T with (length: 10);`
- _[cds-compiler@3.2.0]_ CDL parser: support SQL function `substr_regexpr` with its special argument syntax.
- _[cds-compiler@3.1.0]_ Extending an artifact with multiple includes in one extend statement is now possible:
  `extend SomeEntity with FirstInclude, SecondInclude;`
- _[cds-compiler@3.1.0]_ Aspects can now have actions and functions, similar to entities.  Aspects can be extended by actions as well.
- _[cds-compiler@3.1.0]_ `cdsc`:
  - `toCsn` now supports `--with-locations` which adds a `$location` property to artifacts
  - `toHana`/`toSql` now supports `--disable-hana-comments`, which disables rendering of doc-comments for HANA.
- _[cds-compiler@3.1.0]_ to.hdi/sql/hdbcds: Support FK-access in `ORDER BY` and `GROUP BY`
- _[cds-compiler@3.1.0]_ to.hdi.migration: Detect an implicit change from `not null` to `null` and render corresponding `ALTER`
- _[cds.java@1.27.0]_ The new open-source [Service Binding Access](https://github.com/SAP/btp-environment-variable-access) library is now used as the default source to obtain service bindings. On K8s/Kyma this enables better integration with SAP BTP Service Operator, which uses a ServiceBinding.io-based format. This allows to read service bindings with the same set of metadata as in CloudFoundry automatically.
- _[cds.java@1.27.0]_ A new property `cds.security.authentication.mode` has been introduced which can be set to `never` (disables authentication of CAP endpoints), `always` (authenticates all CAP endpoints), `model-relaxed` (authenticates endpoints based on `@requires`/`@restrict`, defaults to public endpoints) and `model-strict` (authenticates endpoints based on `@requires`/`@restrict`, defaults to authenticated endpoints). It is set to `model-strict` by default to comply with secure-by-default.
- _[cds.java@1.27.0]_ The `cds-services-archetype` provides the new parameter `inMemoryDatabase` to choose the in-memory database configuration for local testing in the newly created CAP Java project. Supported values are `h2` (default) and `sqlite`.
- _[cds.java@1.27.0]_ The property `cds.odataV2.caseSensitiveFilter` now controls, if functions `startsWith`, `endsWith` and `substringOf` are handled case-sensitive in OData V2. By default these functions are case sensitive.
- _[cds.java@1.27.0]_ The `TenantProviderService` now offers a new `readProviderTenant()` method, which provides the tenant ID of the provider. It tries to retrieve this information from an existing XSUAA, Identity (IAS) or SaaS Registry service binding.
- _[cds.java@1.27.0]_ Added the new `cds-feature-redis` artifact providing a Redis-based `MessagingService` using Redis PubSub.
- _[cds.java@1.27.0]_ Annotations `@Capabilities.Readable` and `@Capabilities.ReadRestrictions.Readable` are now handled.
- _[cds.java@1.27.0]_ `ApplicationLifecycleService` now offers new event `ERROR_RESPONSE` which is triggered by OData V2 and ODdata V4 protocol adapters to enable central exception handling.
- _[cds4j@1.31.0]_ Improve key value detection of CqnAnalyzer
- _[cds4j@1.31.0]_ Add factory method `create` w/ key value as parameter in generated data accessor interfaces
- _[cds4j@1.31.0]_ Optimize `Select` statement execution with large result sets
- _[cds4j@1.31.0]_ Optimize batch `Insert` and `Update` execution
- _[cds@6.1.1]_ The configuration schema now includes `cds.extends` and `new-fields` (in `cds.xt.ExtensibilityService`)
- _[cds@6.1.1]_ Ability to run extension validations as part of `cds lint`
- _[cds@6.1.1]_ The `/-/cds/login` endpoint now also supports client credentials authentication
- _[cds@6.1.1]_ `srv.run(fn)` now accepts a function as first argument, which will be run in an active outer transaction, if any, or in a newly created one. This is in contrast to `srv.tx(fn)` which always creates a new tx.

  ```js
  cds.run (tx => { // nested operations are guaranteed to run in a tx
    await INSERT.into (Foo, ...)
    await INSERT.into (Bar, ...)
  })
  ```

- _[cds@6.1.0]_ Support for `@sap/cds-mtxs` in `enterprise-messaging`
- _[cds@6.1.0]_ Detailed information about pool state: `borrowed`, `pending`, `size`, `available`, `max` to the timeout error
- _[cds@6.1.0]_ Odata v2 payloads for `cds.Time` are converted from hh:mm:ss to PThhHmmMssS e.g. 12:34:56 to PT12H34M56S if provided in hh:mm:ss format
- _[cds@6.1.0]_ Odata v2 payloads for `cds.Integer` are converted to String if not provided as String
- _[cds@6.1.0]_ New OData parser supports aliased parameters e.g. `...function(ID=@p)?@p=5`
- _[cds@6.1.0]_ Support for locale "en_US_x_saprigi"
- _[cds@6.1.0]_ Parameter `rows` in ql API function `limit` can be omitted for remote services, e.g. `SELECT.limit(undefined, 5)`
- _[cds@6.1.0]_ New OData parser supports $filter with "in" operator, e.g. `$filter=ID in (1,2,3)`
- _[cds@6.1.0]_ `cds build` copies `package.json` and `.cdsrc.json` into _main folder of MTX sidecar app.
- _[cds@6.1.0]_ New OData parser supports null parameter in function/action, e.g `/findBooks(author=1,title=null)`
- _[cds@6.1.0]_ New environment variable `schemas` contains locations for json schemas validating `package.json`, `.cdsrc.json` and `.cdsrc-private.json` in VS Code
- _[cds@6.1.0]_ `cds.test` can now listen on a fixed port by way of additional arguments '--port', '<PORT_NUMBER>
- _[cds@6.1.0]_ `cds.requires.db.kind = 'sql-mt'` is introduced as a shorthand for

  ```js
  "db": {
    "kind": "sqlite",
    "[production]": {
      "kind": "hana-mt"
    }
  }
  ```

- _[cds@6.1.0]_ `cds build` support for Streamlined MTX extension projects based on build task `mtx-extension`
- _[cds@6.1.0]_ TS definitions for `SELECT.forSharedLock` and `SELECT.forUpdate`
- _[cds@6.1.0]_ TS definitions for `log`
- _[cds@6.1.0]_ Support for new cds build task option `deploy-format`. Java apps may use this option instead of the corresponding global CDS config option.
- _[cds@6.1.0]_ The `ExtensibilityService` serves an endpoint to retrieve a subdomain-specific JWT, which is used by `cds login`
- _[cds@6.1.0]_ The endpoint `/-/cds/extensibility/push` now checks restrictions for new extensions. The configuration is added to the `cds.xt.ExtensibilityService`

  ```json
  "requires": {
    "cds.xt.ExtensibilityService": {
      "element-prefix": ["Z_", "ZZ_"],
      "namespace-blocklist": ["com.sap.", "sap."],
      "extension-allowlist": [
        {
          "for": ["my.bookshop"],
          "kind": "entity",
          "new-fields": 2
        },
        {
          "for": ["CatalogService"],
          "new-entities": 2
        }
      ]
    }
  }
  ```

- _[cds@6.1.0]_ `cds build` validates required service models `@sap/**` for MTX sidecar app and logs an ERROR if some couldn't be resolved.
- _[cds@6.1.0]_ Configuration schema for many properties of the `cds` configuration block in `package.json` or `.cdsrc.json`, especially for `cds.requires...`
- _[cds-graphql@1.1.0]_ Parsing of input literal values specified inline inside of GraphQL queries
- _[cds-mtxs@1.1.2]_ `cds.xt.DeploymentService` now lets you register a `deploy` handler, invoked right before the HDI deployment is triggered.
- _[cds-mtxs@1.1.0]_ `cds.xt.DeploymentService` can now be added via the subscription request or `cds` environment (e. g. HANA via service-manager).
  Via an additional parameter in the subscription payload:

  ```json
  {
    "subscribedTenantId": "tenant",
    "eventType": "CREATE",
    "_": {
      "hdi": {
        "create": {
          "provisioning_parameters": { "database_id" : "DB_ID" }
        }
      }
    }
  }
  ```

  Via the `cds` environment:

  ```json
  "cds": {
    "requires": {
    "cds.xt.DeploymentService": {
      "hdi": {
        "create": {
          "provisioning_parameters": { "database_id" : "DB_ID" }
        }
      }
    }
  }
  ```

### Changed {#aug-22-changed}

- _[cds-dk@6.1.2]_ `cds init` uses latest Maven Java archetype version 1.27.1 for creating Java projects.
- _[cds-dk@6.1.1]_ `cds add helm` updated default resource requirements for both `java` and `nodejs` projects.
- _[cds-dk@6.1.1]_ `cds add helm` uses servicebinding.io bindings for CAP Java services, HANA and HTML5 app deployment jobs.
- _[cds-dk@6.1.1]_ `cds compile --to openapi` creates only component schemas for schemas referenced in operations and in other schemas.
- _[cds-dk@6.1.1]_ `cds import` switch from `@openapi.schema` to `@JSON.Schema`.
- _[cds-dk@6.1.1]_ `cds add mtx` will now add configuration for streamlined MTX. It effectively acts as a shortcut for `cds add multitenancy,toggles,extensibility`
- _[cds-dk@6.1.1]_ `cds add mtx` no longer includes `hana` and `xsuaa`.  To achieve the same effect as before, run `cds add mtx && cds add hana,xsuaa --for production`.
- _[cds-dk@6.1.1]_ `cds bind -2 <xsuaa service instance>` binds the CDS `auth` service to the xsuaa instance. Previously `uaa` was used.  This requires `@sap/cds` 6 or higher.
- _[cds-dk@6.1.1]_ `cds add lint:dev` updated to adjust to new api structure of `@sap/eslint-plugin-cds` v2.5.0
- _[cds-dk@6.1.1]_ `cds init` uses latest Maven Java archetype version 1.27.0 for creating Java projects.
- _[cds-dk@6.1.1]_ `cds login localhost:<port> -u <username>` now saves username (and empty password, if applicable) with project settings for convenience.
- _[cds-dk@6.1.1]_ `cds add` error handling is improved and will give suggestions if you make a typo.
- _[cds-dk@6.0.4]_ `cds init` uses latest Maven Java archetype version 1.26.1 for creating Java projects.
- _[cds-dk@6.0.4]_ Use `@sap/cds` 6.0.4
- _[cds-dk@6.0.4]_ `cds bind` handles orgs and spaces containing commas correctly.
- _[eslint-plugin-cds@2.5.0]_ Model Validation rules use `parsed` flavor by default (`meta.model` property)
- _[eslint-plugin-cds@2.5.0]_ Environment rules have { model: "none" }
- _[cds-compiler@3.1.0]_ compiler: If an unknown file extension is used but the file starts with
  an opening curly brace (`{`), it will be parsed as CSN.
- _[cds-compiler@3.1.0]_ to.edm(x): In V4 containment mode, pull up `@Capabilities` annotations from the containers to the root container (set)
  and translate them into corresponding `@Capabilities.NavigationRestrictions`. If a `NavigationRestriction` is already available
  for that containment path, capabilities are merged into this path. Capability annotation value paths are prefixed with
  the navigation restriction path.
  The capability 'pull up' has an effect on entity annotations only. `@Capabilities` assignments on compositions are not pulled
  up but rendered to the association type which is important to enable dynamic capabilities on 'to-many' relations and to avoid
  ambiguities in entity set capabilities.
- _[cds-compiler@3.1.0]_ Update OData vocabularies 'Analytics', 'Capabilities', 'Common', 'Core', 'DataIntegration', 'Graph', 'PersonalData', 'UI', 'Validation'.
- _[cds.java@1.27.0]_ The minimum required version of Spring Boot is now `2.7.x`. Make sure to consider the upgrade instructions in the [Spring Boot 2.7 Release Notes](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes).
- _[cds.java@1.27.0]_ The deprecated `WebSecurityConfigurerAdapter` are migrated to `SecurityFilterChain`. As both can't coexist custom security configurations in applications need to be migrated to `SecurityFilterChain` as well.
- _[cds.java@1.27.0]_ Projects generated with the cds-services-archetype for now explicitly use H2 v1 to avoid incompatibilities with SQL generated by CDS Compiler.
- _[cds.java@1.27.0]_ Authentication-related settings have been moved to a new `cds.security.authentication` configuration section. Within section `cds.security` property `authenticateUnknownEndpoints` has been replaced by `authentication.authenticateUnknownEndpoints` and `openMetadataEndpoints` has been replaced by `authentication.authenticateMetadataEndpoints`. The settings `openUnrestrictedEndpoints` and `defaultRestrictionLevel` have been subsumed under the new property `authentication.mode`. All previous properties are deprecated and can still be used for compatibility.
- _[cds4j@1.31.0]_ Disable deprecated path access via `CdsData:get`, instead use `getPath`
- _[cds@6.1.0]_ Streamlined calculation of the difference for `DELETE` queries using `req.diff()`
- _[cds@6.1.0]_ Improved error messages for rest / new odata parser
- _[cds@6.1.0]_ Adjust types for `SELECT.from` and `SELECT.one` to accept array classes as well
- _[cds@6.1.0]_ No `"` added around search values in OData v2 e.g. Foo?search=name is passed through as is
- _[cds@6.1.0]_ If an entity can not be read after write (e.g. insert only entity) no error is shown in the log
- _[cds@6.1.0]_ Throw not supported error for pagination in `$expand`
- _[cds-mtx@2.6.1]_ Retries for container creation and deployment have been disabled. Retries can be configured using via cds env:

  ```json
  "mtx": {
     "provisioning": { "retries": 2 }
  }
  ```

  retries two times after a failure.
- _[cds-mtxs@1.1.1]_ Log and debug output is improved.

### Fixed {#aug-22-fixed}

- _[cds-dk@6.1.2]_ `cds add helm` fixed JSON Schema for `srv` property in values.yaml
- _[cds-dk@6.1.2]_ `cds add helm` fixed env property errors for `hana_deployer` and `html5_apps_deployer`
- _[cds-dk@6.1.2]_ `cds add data` now creates proper data file names for entities in a `context`, i.e. `sap.common-Countries.csv` instead of `sap-common-Countries.csv`
- _[cds-dk@6.1.2]_ `cds import` now captures the parameter/property of collection type differently and the associated annotations are pulled out of the `items` object of the parameter/property entry in the csn.
- _[cds-dk@6.1.2]_ Remove redundant `console.log()` statement in `cds lint`
- _[cds-dk@6.1.2]_ `cds push` now shows complete error messages from extension validation
- _[cds-dk@6.1.2]_ `cds push` and related commands now show properly formatted error messages and also fail with a non-zero exit code in error situations
- _[cds-dk@6.1.1]_ `cds add helm:connectivity`: `connectivity.configMapName` was not used for the `connectivity-proxy-info`.
- _[cds-dk@6.1.1]_ `cds import` replaced occurrences of `\\` with `/` in the `package.json` for Linux platforms.
- _[cds-dk@6.1.1]_ `cds import` fixed `@Core.Description` and `doc` property duplication.
- _[cds-dk@6.1.1]_ `cds extend` and `cds activate` no longer save any data (this is reserved to `cds login`).
- _[cds-dk@6.1.1]_ Extensibility commands now add http (not https) to local app URLs without schema.
- _[cds-dk@6.1.1]_ Extensibility commands don't query CF any longer when run against local apps.
- _[vscode-cds@6.1.1]_ fixed error when text editor is not found in CAP notebook decoration
- _[cds-compiler@3.2.0]_ An internal dump could have occurred in certain situations
  for models with cyclic type definitions.
- _[cds-compiler@3.2.0]_ Annotations on inferred enum elements of views were lost during recompilation.
- _[cds-compiler@3.2.0]_ to.cdl: Annotations on enum value in query elements were lost.
- _[cds-compiler@3.2.0]_ for.odata: Allow dynamic shortcut annotation values (`$edmJson`).
- _[cds-compiler@3.2.0]_ to.edm(x):
  - Don't overwrite annotations of input model.
  - Ignore `null` values in `$edmJson` strings.
- _[cds-compiler@3.2.0]_ to.hdi.migration: Don't interpret bound action changes as element changes.
- _[cds-compiler@3.1.2]_ to.edm(x):
  - `@Capabilities` 'pull up' for containment trees should not prefix the
    dynamic annotation paths of the root container.
  - Remove service namespace prefix of a parameter type for function/action annotation targets
    in multi schema mode if the parameter type is defined in an alternative schema.
- _[cds-compiler@3.1.0]_ Syntax of date/time literals are now checked against ISO 8601. If the format is invalid, a warning is emitted.
- _[cds-compiler@3.1.0]_ The code completion directly after the `(` for functions with special syntax
  now suggests all valid keywords, like for `extract` or `locate_regexpr`.
- _[cds-compiler@3.1.0]_ compiler:
  - `cast(elem as EnumType)` crashed the compiler.
  - Annotations on sub-elements in query entities were lost during re-compilation.
  - An association's cardinality was lost for new associations published in projections.
  - Annotations on indirect action parameters were lost in CSN flavor `gensrc`.
  - Re-allow `annotate` statements referring to the same element twice,
    even if there are annotation assignments for sub elements.
  - If a file's content starts with `{` and if neither file extension is known nor
    `fallbackParser` is set, assume the source is CSN.
- _[cds-compiler@3.1.0]_ all backends: references in `order by` _expressions_ are correctly resolved.
- _[cds-compiler@3.1.0]_ to.edm(x):
  - Allow cross service references for unmanaged associations and improve warning message for muted associations.
  - Nested `@UI.TextArrangement` has precedence over `@TextArrangement` shortcut annotation for `@Common.Text`.
- _[cds-compiler@3.1.0]_ to.hdi.migration:
  - Doc comments rendered the _full doc comment_ instead of only the first paragraph, as `to.hdi` does.
  - Respect option `disableHanaComments` when rendering the `ALTER` statements
- _[cds-compiler@3.1.0]_ to.hdi/sql/hdbcds:
  - Check for invalid usages of `$self` and give helpful errors
  - Correctly resolve association-steps in the from-clause in conjunction with `exists`
- _[cds-compiler@2.15.8]_ to.edm(x): Nested `@UI.TextArrangement` has precedence over `@TextArrangement` shortcut annotation for `@Common.Text`.
- _[cds-compiler@2.15.8]_ to.hdi.migration:
  - Respect option `disableHanaComments` when rendering the `ALTER` statements
  - Doc comments rendered the _full doc comment_ instead of only the first paragraph, as `to.hdi` does.
- _[cds-compiler@2.15.8]_ compiler: An association's cardinality was lost for associations published in projections.
- _[cds.java@1.27.1]_ Fixed a bug, causing the audit log service to throw an exception, if the user name was empty when using the `oauth2` plan.
- _[cds.java@1.27.1]_ Fixed a bug, causing the feature-dependent EDMX to be ignored in OData V2 and V4 in single-tenancy scenario.
- _[cds.java@1.27.1]_ Fixed a regression, causing `$metadata` response in JSON format to no longer work.
- _[cds.java@1.27.0]_ The `mvn cds:version` goal now is able to parse the version output generated by `@sap/cds-dk@6`.
- _[cds.java@1.27.0]_ The passwords of mock users are now encoded using the Spring Security `{noop}` encoder. This drastically improves performance. Note that mock users are not intended for productive usage.
- _[cds.java@1.27.0]_ Fixed a bug causing the partition collector thread of the persistent outbox to crash if a non-`Exception` `Throwable` was thrown by the processed event.
- _[cds.java@1.27.0]_ Fixed a bug causing the JMS connection reestablishment to fail for Message Queueing.
- _[cds.java@1.27.0]_ Fixed a bug causing UTF-8 BOM headers in csv files to fail the CSV-based database initialization.
- _[cds.java@1.27.0]_ Fixed a bug that prevented errors in remote OData requests to be written to the application logs, when the error didn't match the OData error structure.
- _[cds.java@1.27.0]_ Fixed a bug causing character-based media streams, represented by `Reader` instances, to be handled incorrectly in OData V4.
- _[cds.java@1.27.0]_ Fixed a bug causing an explicit `@requires: 'any'` (public endpoint) on service-level to not propagate to the entity-level.
- _[cds.java@1.27.0]_ Fixed a bug causing errors when special characters such as `&` are used in OData V4 search phrases.
- _[cds@6.1.1]_ Erroneous checks for `join` in `SELECT.from(SELECT.from('xxx'))`
- _[cds@6.1.1]_ Virtual fields with default values in draft context
- _[cds@6.1.1]_ View resolving without model information doesn't crash
- _[cds@6.1.1]_ Unable to upload large attachments. Uploading a large attachment (base64 encoded) caused a runtime exception.
- _[cds@6.1.1]_ `cds.Query.then()` is using `AsyncResource.runInAsyncScope` from now on. &rarr; this avoids callstacks being cut off, e.g. in debuggers.
- _[cds@6.1.1]_ `cds.tx()` and `cds.context` have been fixed to avoid accidental fallbacks to auto-commit mode.
- _[cds@6.1.1]_ HDI configuration data (e.g. `./cfg`, `.hdiignore`) is now included in the `resources.tgz` file which is required for Streamlined MTX.
- _[cds@6.1.1]_ `cds deploy` accepts in addition to `VCAP_SERVICES` also `TARGET_CONTAINER` and `SERVICE_REPLACEMENTS` from vcap file when using `--vcap-file` parameter.
- _[cds@6.1.1]_ `cds build` doesn't duplicate CSV files that are contained in `db/src/**`.
- _[cds@6.1.1]_ Typescript issues in `apis/log.d.ts`
- _[cds@6.1.1]_ `cds build` adds OS agnostic base model path to generated feature CSN.
- _[cds@6.1.1]_ Unhandled promise rejection in `expand` handling
- _[cds@6.1.1]_ `cds.context.model` middleware is not mounted for not extensible services
- _[cds@6.1.1]_ `cds.context` continuation was sometimes not reset in REST adapter
- _[cds@6.1.0]_ Wrong context in `tx.run(query)` when `query` is an array
- _[cds@6.1.0]_ We now detect and ignore erroneous attempts to re-register framework-generated stubs as handlers for custom actions/functions.
- _[cds@6.1.0]_ Emits with `persistent-outbox` also work with manual transactions
- _[cds@6.1.0]_ You can now use `cds.ql` fluent API to query tables not in the model, but in database.
  For example, within `cap/samples/bookshop` this works now:

  ```sql
  await SELECT.from('sqlite_master')
  await cds.read('sqlite_master')
  ```

  Caveat: the following undocumented usage of unqualified names happened to work in the past.
  But this was very fragile and caused lots of issues, and therefore was removed:

  ```sql
  await SELECT.from('Books')
  await cds.read('Books')
  ```

  Always use qualified names, or reflected definitions instead:

  ```sql
  const Books = 'sap.capire.bookshop.Books'
  await SELECT.from(Books)
  await cds.read(Books)
  ```

  ```sql
  const {Books} = cds.entities ('sap.capire.bookshop')
  await SELECT.from(Books)
  await cds.read(Books)
  ```

- _[cds@6.1.0]_ Wrong results for expand to many without `orderBy`
- _[cds@6.1.0]_ `cds deploy` api endpoint regex for cli now ignores trailing version info in url
- _[cds@6.1.0]_ Default values no longer overwrite payload values on fields of new drafts
- _[cds@6.1.0]_ Unmanaged to-one navigation caused malformed SQL statement in draft
- _[cds@6.1.0]_ `cds.compile.to.serviceinfo` fix failure to detect Java services if `odataV4.endpoint.path` or `odataV2.endpoint.path` missing in `cds` configuration in `application.yaml`
- _[cds@6.1.0]_ Data type conversion did not work in some expand cases
- _[cds@6.1.0]_ Failed connection to SAP HANA with no or malformed credentials was leading to credentials being written to the log
- _[cds@6.1.0]_ `cds build` no longer fails with an error `no such file` if one of the following files has been defined in some `srv` subfolder - `package.json, package-lock.json, .cdsrc.json, .npmrc`
- _[cds@6.1.0]_ Tar issue on Windows: 'The command line is too long'.
- _[cds@6.1.0]_ `$search`: Lifecycle issue that causes an empty search result when the `$search` and `$expand` query options were combined
- _[cds@6.1.0]_ Operator `IN` with Tagged Template String Literals e.g.:

  ```sql
  SELECT.from(Object).where`userId IN ${aUserIDs}`
  ```

- _[cds@6.1.0]_ `cds build` now uses a closed version range in the node engines version of the deployed application's `package.json`
- _[cds@6.1.0]_ `cds build` no longer generates EDMX files for services that aren't odata protocol enabled
- _[cds@6.1.0]_ `cds deploy` handles orgs and spaces containing commas correctly
- _[cds@6.1.0]_ Incorrect decoding of special characters when reading data of type `cds.LargeString` from SAP HANA using `hdb@^0.19.5` driver
- _[cds@6.1.0]_ The payload is added to the delete request in rest adapter as req.data
- _[cds-mtx@2.6.1]_ Use of legacy APIs for scope checks has been removed
- _[cds-mtx@2.6.1]_ Better compatibility for environments without vcap-environment, especially DwC
- _[cds-mtx@2.6.1]_ Restored compatibility for Node.js 12.  In version 2.6.0, this failed with an error like `SyntaxError: Unexpected token`.
- _[cds-mtx@2.6.1]_ Extension linters now also check types and aspects
- _[cds-mtx@2.6.1]_ I18n file collection now works correctly with @sap/cds@6
- _[cds-mtx@2.6.1]_ Job status of asynchronous requests to scaled applications is now returned correctly again
- _[cds-mtxs@1.1.1]_ `cds.xt.DeploymentService` can now also be called by users with role `cds.Subscriber`.
- _[cds-odata-v2-adapter-proxy@1.9.5]_ Fix media upload via associations/compositions using POST
- _[cds-odata-v2-adapter-proxy@1.9.5]_ Fix duplication of streaming request data for media entity (chunked)
- _[cds-odata-v2-adapter-proxy@1.9.5]_ Fix result structure for parameterized entities entry addressed by key (object or not found)
- _[cds-odata-v2-adapter-proxy@1.9.5]_ Update README on sample apps
- _[cds-odata-v2-adapter-proxy@1.9.4]_ Remove logging library `@sap/logging`. Use `cds.log` instead.
- _[cds-odata-v2-adapter-proxy@1.9.4]_ Remove obsolete proxy option `disableNetworkLog`
- _[cds-odata-v2-adapter-proxy@1.9.4]_ Proxy option `fixDraftRequests` suppresses unsupported draft expand to `SiblingEntity` and injects `SiblingEntity: null`

## July 2022

### Added {#jul-22-added}

- _[cds-dk@6.0.0]_ `cds import` now supports importing external openapi specification file into CSN.
- _[cds-dk@6.0.0]_ `cds import` now supports the `--from` option to specify the protocol for importing an external file.
- _[cds-dk@6.0.0]_ `cds import` can be programmatically accessed using APIs `cds.import()`, `cds.import.from.edmx()`, and `cds.import.from.openapi()`.
- _[cds-dk@6.0.0]_ `cds compile --to openapi` allows describing custom headers and custom query options.
- _[cds-dk@6.0.0]_ `cds import` now supports `HasStream="true"` for both OData V4 and V2.
- _[cds-dk@6.0.0]_ `cds compile --to openapi` now adds properties with `@mandatory` to the required field.
- _[cds-dk@6.0.0]_ Added a link to VS Code CAP Notebooks documentation to `cds init --add notebooks` and `cds add notebooks`.
- _[vscode-cds@6.0.0]_ using native `notebook` support for `cap-notebook`
- _[vscode-cds@6.0.0]_ support for new major cds-compiler 3.0.0
- _[vscode-cds@6.0.0]_ new user setting `cds.workspaceSymbols.caseInsensitive` (default off) to search case insensitive
- _[vscode-cds@6.0.0]_ new user setting `cds.outline.semantical` (default off) to show outline in a rather semantical structure as opposed to a flat list
- _[vscode-cds@6.0.0]_ analyze dependencies now supports coloring of layers for monorepos
- _[vscode-cds@6.0.0]_ `env.cdsc` is now also considered for code completion
- _[vscode-cds@6.0.0]_ custom requests to format given content with given options (for example, for a _formatting options config UI_) and to get path of options file
- _[cds.java@1.26.0]_ Support for the new `@sap/cds-mtxs` multitenancy sidecar can now be enabled by setting `cds.multitenancy.mtxs.enabled` to `true`.
- _[cds.java@1.26.0]_ OData V2 now also supports directly creating active versions of draft-enabled entities through `POST` by passing `{"IsActiveEntity": true}` in the payload.
- _[cds.java@1.26.0]_ Validations of `@assert.target` now use a shared database lock when reading the target entity instance.
- _[cds.java@1.26.0]_ Annotation `@protocol` can now be used as alias for `@protocols`. Both annotation allow single and arrayed values. You can use `@protocol: 'none'` to avoid serving a service.
- _[cds.java@1.26.0]_ The `cds-maven-plugin` now allows to set additional environment variables when executing the goals `install-cdsdk`, `cds`, `npm` and `npx`.
- _[cds4j@1.30.0]_ Support `@cds.java.name` on action and function parameters
- _[cds4j@1.30.0]_ Support _shared_ locks for pessimistic locking
- _[cds4j@1.30.0]_ Add `CdsData::create` to create new instances of CdsData
- _[cds@6.0.1]_ Config option `cds.env.server.port` allows to configure the port to use (in addition to `process.env.PORT` and CLI option `--port`)
- _[cds-mtx@2.6.0]_ Support for new build task aliases `java` and `nodejs`
- _[cds-graphql@1.0.0]_ Extracted GraphQL protocol adapter from `@sap/cds` to `@sap/cds-graphql`
- _[cds-graphql@1.0.0]_ Support for `@sap/cds` `cds.plugins`
- _[cds-mtxs@1.0.1]_ `@sap/cds-mtxs` now has a `peerDependency` to `@sap/cds`.

### Changed {#jul-22-changed}

- _[cds-dk@6.0.3]_ `cds init` uses latest Maven Java archetype version 1.26.0 for creating Java projects.
- _[cds-dk@6.0.3]_ `cds init` now creates Node.js projects with version 6 of `@sap/cds`
- _[cds-dk@6.0.2]_ Use `@sap/cds` 6.0.2
- _[cds-dk@6.0.1]_ Deprecated the `--for <filterPattern>` parameter of `cds add data` in favor of the new `--data:for`.  The former is still supported, but will eventually be removed, as it collides with the general `--for <profile>` parameter of `cds add`.
- _[cds-dk@6.0.0]_ `cds import` now uses `@odata.Type` and `@odata.Precision` for edm to cds type mapping.
- _[cds-dk@6.0.0]_ `cds compile --to openapi` now has better description for `$expand` query option.
- _[cds-dk@6.0.0]_ The original package `sqlite3` is now used again in its latest version.
- _[cds-dk@6.0.0]_ `cds import` now deprecated `cds.DecimalFloat` type.
- _[cds-dk@6.0.0]_ `cds import` now allows OData version 4.01 edmx files and supports `Scale="floating"`.
- _[cds-dk@6.0.0]_ `cds import` now adds `@odata.Type` annotation for `Edm.Byte` and `Edm.SByte`.
- _[cds-dk@6.0.0]_ `cds import` now has improved tests to check `--as`option with `force` flag file overwriting.
- _[cds-dk@6.0.0]_ `cds init` uses latest Maven Java archetype version 1.25.0 for creating Java projects.
- _[cds-dk@6.0.0]_ `cds import` now imports edmx file without any entities containing only unbounded action/function.
- _[cds-dk@6.0.0]_ `cds import` API now supports includeNamespaces option.
- _[cds-dk@6.0.0]_ `cds compile --to openapi` now adds `format`, `multipleOf`, `maximum` and `minimum` to anyOf.
- _[cds-dk@6.0.0]_ `cds import` will now mark an association as a composition when `OnDelete Action="Cascade"` is present.
- _[cds-dk@6.0.0]_ `cds import` has deprecated `--into` option.
- _[cds-dk@6.0.0]_ `cds bind` reads Cloud Foundry file `config.json` to get org and space information.
- _[cds-dk@6.0.0]_ `cds deploy` now stores connection information without credentials by default in `.cdsrc-private.json`.
- _[cds-dk@6.0.0]_ `cds deploy` has a new option `--store-credentials` to enforce the former behavior of storing credentials in `default-env.json`.
- _[cds-dk@6.0.0]_ If a `@sap/cds` is installed locally in a project, it must be version 4 or higher for CLI commands to run.
- _[cds-dk@6.0.0]_ `cds import` now doesn't trim the bound action/function name in the csn if the format of the name is A_B.
- _[cds-dk@6.0.0]_ `@sap/cds` version 6 is now required in new projects added by `cds init` and `cds add`.
- _[vscode-cds@6.0.3]_ support latest release of cds-compiler 3.0.2
- _[vscode-cds@6.0.3]_ added authentication and new build task names to cds schema
- _[vscode-cds@6.0.0]_ now requires NodeJS `>=16.11` (included in recent VS Code)
- _[vscode-cds@6.0.0]_ now requires Visual Studio Code `>=1.66`
- _[vscode-cds@6.0.0]_ use `workspace.fs` for file IO during `cds preview`.
- _[cds.java@1.26.0]_ The default value of `cds.security.defaultRestrictionLevel` is now `authenticated-user`. Endpoints that are not explicitly annotated with `@restrict` or `@requires` now require authentication by default. To model open endpoints, you need to explicitly expose services or entities to `any` in your model.
- _[cds.java@1.26.0]_ In case multitenancy is enabled `cds.security.openUnrestrictedEndpoints` no longer defaults to `false`. In case you annotated any services or entities **explicitly** with `@requires: any` they are no longer authenticated and no tenant information is available therefore. Consider removing the annotation or changing it to `@requires: authenticated-user`.
- _[cds.java@1.26.0]_ Updated default Node.js version used by CDS Maven Plugin to `v14.19.3`
- _[cds4j@1.30.0]_ Deprecate `CdsAssociationType::keys`, instead use `CdsAssociationType::refs`
- _[cds@6.0.3]_ On Business Application Studio, `@sap/cds` now rejects starting on Node 12, as it does locally.  This avoids cryptic follow-up errors.
- _[cds@6.0.1]_ Plugins cannot be loaded as ES modules, but need to remain CommonJS modules
- _[cds-graphql@1.0.0]_ Refactor GraphQL schema generation to build schema using the `GraphQL.js` `GraphQLSchema` object rather than manually building an SDL string
- _[cds-graphql@1.0.0]_ Let `cds.tx` handle setting `cds.context` instead of setting it manually
- _[cds-graphql@1.0.0]_ Nest `create`, `update` and `delete` mutations within the entity that they mutate instead of naming mutations by prefixing the entity with the operation they perform:

  ```graphql
  mutation {
    AdminService {
      Books {
        create(input: { title: "Moby-Dick" }) {
          title
        }
      }
    }
  }
  ```

- _[cds-graphql@1.0.0]_ Replace inequality operator `<>` with `!=` generated in `CQN` by `eq` filter to align with OData protocol adapter
- _[cds-graphql@1.0.0]_ Logging level of `query on ${entity.name}` and `mutation on ${entity.name}` messages from `log` to `debug`

### Fixed {#jul-22-fixed}

- _[cds-dk@6.0.3]_ `--vap-file` parameter of `cds deploy` is available again (removed in 6.0.0)
- _[cds-dk@6.0.3]_ `cds add helm:connectivity`: `connectivity.configMapName` was not used for the `connectivity-proxy-info`.
- _[cds-dk@6.0.3]_ `--vcap-file` parameter of `cds deploy` is available again (removed in 6.0.0)
- _[cds-dk@6.0.3]_ `cds add helm:connectivity`: `connectivity.configMapName` was not used for the `connectivity-proxy-info`.
- _[cds-dk@6.0.3]_ `cds add helm:connectivity`: Environment variables added for connectivity service for Java.
- _[cds-dk@6.0.3]_ `cds add helm`: Generation of `xs-security.json` file works on Windows now (`cds compile srv -2 xsuaa` command failed).
- _[cds-dk@6.0.1]_ `cds bind` api endpoint regex for cli now ignores trailing version info in url
- _[cds-dk@6.0.0]_ `cds compile --to openapi` fixes annotations on bound action overloads.
- _[cds-dk@6.0.0]_ `cds add cf-manifest` now uses the correct `application` plan for the `xsuaa` service
- _[cds-dk@6.0.0]_ A combination of `cds add approuter`, `cds add mtx`, and `cds add mta` will now use a safer approach to determine the subscription URL.
- _[cds-dk@6.0.0]_ `cds init` and `cds add` output the feature names correctly in case the names contain a dash
- _[cds-dk@6.0.0]_ `cds compile --to openapi` fix for type error when entity/action is not specified in the service definition.
- _[cds-dk@6.0.0]_ `cds import` API fix for race condition issue.
- _[cds-dk@6.0.0]_ `cds somecdsfile --profile ...` (without the `compile` command) no longer ignores the given profile
- _[cds-dk@6.0.0]_ `cds watch` got more robust against unlucky timing and no longer runs into port conflicts
- _[vscode-cds@6.0.4]_ show not-supported warning when opening CAP Notebook page in SAP Business Application Studio
- _[vscode-cds@6.0.0]_ fixed glitches in cds schema support for `package.json`, `.cdsrc.json` and `.cdsrc-private.json`
- _[vscode-cds@6.0.0]_ fixed highlighting for empty block comments `/**/`
- _[cds-compiler@3.0.2]_ to.sql: For `sqlDialect` `plain`, `$now` is replaced by `CURRENT_TIMESTAMP` again.
- _[cds-compiler@3.0.2]_ compiler:
  - Don't crash if a USING filename is invalid on the operating system, for example, if `\0` is used.
  - Info messages for annotations on localized convenience views are only emitted for unknown ones.
  - Improve error message for an `extend` statement which had added a new element
    and tried to extend that element further.  Similarly for a new action.
    (If you consider this really of any use, use two `extend` statements.)
- _[cds-compiler@3.0.2]_ for.odata: expand `@readonly`/`@insertonly` on aspects as for entities into `@Capabilities`.
- _[cds-compiler@3.0.2]_ to.edm(x):
  - Exclude managed association as primary key on value list annotation preprocessing.
  - Don't render annotations for aspects defined in a service.
- _[cds-compiler@2.15.6]_ Annotations on sub-elements were lost during re-compilation.
- _[cds.java@1.26.1]_ Fixed a bug causing example tests generated by the `cds-services-archetype` to fail if `cds-starter-cloudfoundry` is present.
- _[cds.java@1.26.1]_ Fixed a bug causing non-ASCII characters to be handled incorrectly in file-based messaging.
- _[cds.java@1.26.0]_ Fixed a bug, causing errors produced by annotation `@assert.target` to have an incorrect target path in case of nested data.
- _[cds.java@1.26.0]_ Fixed a bug, causing error `no target table or view available for FOR UPDATE clause` on SAP HANA when the target entity of an association annotated with `@assert.target` has localized fields.
- _[cds.java@1.26.0]_ Fixed a bug, causing duplicate `ID__` values on OData V2 aggregation requests.
- _[cds.java@1.26.0]_ Fixed a bug, causing CSV imports into an in-memory database to be missed for entities behind a feature flag.
- _[cds.java@1.26.0]_ Fixed a bug, causing headers being incorrectly propagated from a `$batch` parent requests to its child requests.
- _[cds.java@1.26.0]_ Fixed a bug, causing incorrect handling of OData nextlinks when using `$top`.
- _[cds.java@1.26.0]_ Fixed a bug, causing incorrect results when querying OData v2 analytical views (`Aggregation.ApplySupported.PropertyRestrictions: true`) with `$count`.
- _[cds@6.0.4]_ Local mocking of external services using `cds watch`
- _[cds@6.0.3]_ Generic handlers for draft-related operations will trigger a READ event afterwards
- _[cds@6.0.3]_ `file-based-messaging` only watches the file when at least one handler is registered
- _[cds@6.0.3]_ `--vap-file` parameter of `cds deploy` is available again
- _[cds@6.0.3]_ `cds build` no longer throws an error if `@sap/cds-mtx` library (classic MTX) isn't installed locally.
- _[cds@6.0.3]_ `cds.spawn` no longer tries to reuse a transaction
- _[cds@6.0.3]_ Custom query parameter caused bad request on certain characters in rest adapter
- _[cds@6.0.3]_ `cds-ts` no longer fails with an `ERR_UNKNOWN_FILE_EXTENSION` error
- _[cds@6.0.3]_ Timeouts when sending string payloads to remote services
- _[cds@6.0.3]_ `cds.context.http` for `$batch` using atomicity groups
- _[cds@6.0.2]_ Jest tests do not fail any longer because of logs during app shutdown
- _[cds@6.0.2]_ `cds build` now uses correct `mtx/sidecar` context. This avoids redundant `cds-mtxs` npm dependency for Java projects.
- _[cds@6.0.1]_ Removed debug log about shutdown from `cds serve`
- _[cds@6.0.1]_ Hiding timeout error in production mode
- _[cds-mtx@2.6.0]_ `@sap/cds-mtx` is now compatible with @sap/cds@^6.
- _[cds-mtx@2.6.0]_ Kibana logs of asynchronous jobs now always have the correct correlation id.
- _[cds-mtx@2.6.0]_ Upgrade of tenants with no meta tenant (for example, created by dynamic deployer) can now be upgraded again, including the creation of the missing meta tenant.
- _[cds-mtx@2.6.0]_ Upgrade of tenants now consistently updates the base model files per tenant again.
- _[cds-graphql@1.0.0]_ Only generate `eq` and `ne` comparison operations for boolean filters
- _[cds-graphql@1.0.0]_ Queries on entities with names that contain underscores
- _[cds-graphql@1.0.0]_ Only generate args for fields that represent elements with to-many relationships
- _[cds-odata-v2-adapter-proxy@1.9.3]_ Fix batch handling of parameterized entities
- _[cds-odata-v2-adapter-proxy@1.9.2]_ Check on `cds.mtx.eventEmitter` before access
- _[cds-odata-v2-adapter-proxy@1.9.2]_ Restructure README
- _[cds-odata-v2-adapter-proxy@1.9.1]_ Compile CSN for Node.js when loaded from CDS MTX services
- _[cds-odata-v2-adapter-proxy@1.9.1]_ Check on `cds.requires.multitenancy` instead of deprecated `cds.requires.db.multiTenant` (compatible)
- _[cds-odata-v2-adapter-proxy@1.9.1]_ Support `$count` with parameterized entities
- _[cds-odata-v2-adapter-proxy@1.9.1]_ Make decoding of JWT token body more robust (error log in case of invalid JWT)
- _[cds-odata-v2-adapter-proxy@1.9.1]_ Synchronize parallel loading of CSN and EDMX
- _[cds-odata-v2-adapter-proxy@1.9.1]_ First (alpha) support for CDS Streamlined MTX (no extensibility support yet)
- _[cds-odata-v2-adapter-proxy@1.9.1]_ Move `@types/express` to devDependencies
- _[cds-odata-v2-adapter-proxy@1.9.0]_ CDS 6 compatible version
- _[cds-odata-v2-adapter-proxy@1.9.0]_ Enhance proxy option `target` with mode `auto` to handle dynamic target/port assignment (for example, for unit-tests)
- _[cds-odata-v2-adapter-proxy@1.9.0]_ Represent time component of `cds.Date/Edm.DateTime` with second precision (i.e. `00:00:00`)

### Removed {#jul-22-removed}

- _[cds-graphql@1.0.0]_ Dependency on `@graphql-tools/schema` previously used to combine SDL string with resolvers

## June 2022

### Added {#jun-22-added}

- _[eslint-plugin-cds@2.4.1]_ Authorization rules 'auth-*'.
- _[cds-compiler@3.0.0]_ Instead of requiring all files on startup, they are required on an as-needed basis to reduce startup times.
- _[cds-compiler@3.0.0]_ CDL parser: support SQL functions `locate_regexpr`, `occurrences_regexpr`,
  `replace_regexpr` and `substring_regexpr` with their special argument syntax.
- _[cds-compiler@3.0.0]_ CDL parser: the names `trim` and `extract` are not reserved anymore.
- _[cds.java@1.25.0]_ When setting the new property `cds.security.defaultRestrictionLevel = authenticated-user` the Spring security (auto-)configuration **authenticates** all CAP endpoints that are **not** explicitly annotated with `@restrict` or `@requires`. In that case `cds.security.openUnrestrictedEndpoints = true` will only open endpoints that are explicitly exposed to `any`. By default `cds.security.defaultRestrictionLevel` is set to `any`, making endpoints public by default.
- _[cds.java@1.25.0]_ Annotation `@assert.target` can be used to ensure that target of managed to-one association is present. The target entity should be present prior to the creation of entity which require such assertion and cannot be created in same transaction. For compositions, to-many associations, unmanaged or managed to-one associations annotated with `@cascade` the `@assert.target` annotation will be ignored.
- _[cds.java@1.25.0]_ Added a new `FeatureTogglesProvider` for mocked users, which reads array of enabled feature toggles from `cds.security.mock.tenants.features` or `cds.security.mock.users.features`.
- _[cds.java@1.25.0]_ `cds-maven-plugin` is enhanced with new goal `auto-build` which eases use of Spring Developer Tools. Once started, it reacts to changes in the CDS model and starts CDS builds automatically. In contrast to the `watch` goal it does not start the Java application and hence is suitable to enable development with IDEs.
- _[cds.java@1.25.0]_ The `cds-maven-plugin` provides the new goal `npx` which can be used to execute an `npx` command during the build.
- _[cds.java@1.25.0]_ Improved debug logging of user information resolved by `UserInfoProvider` implementations.
- _[cds4j@1.29.0]_ Reflection API: Support paths over associations and structured elements in `CdsStructuredType#getTargetOf`
- _[cds4j@1.29.0]_ Support `@cds.java.name` on actions and functions
- _[cds@6.0.0]_ Listeners for `commit` events on the request object are now awaited
- _[cds@6.0.0]_ Experimental support for ECMAScript modules (ESM): You can now write your custom code, i.e.,
  service implementations, `server.js`, `db/init.js` using ES6 `import` statements.
  **Note though** that this is _experimental_ for now. Known limitation: _jest_ doesn't
  support dynamic imports, which are required for that.
- _[cds@6.0.0]_ Improved `cds.error` to allow these using variants:

  ```js
  cds.error `Message with formatted: ${{foo:'bar'}}`
  cds.error ({ message, code, ... })
  cds.error (message, { code, ... })
  let e = new cds.error(...) //> will not throw
  ```

  > Calling `cds.error()` with `new` returns the newly created Error,
  > while calling it without `new` it throws immediately. The latter is
  > useful for usages like that:
- _[cds@6.0.0]_ Improved `req.error` to always turn each recorded error in to an instance of `Error` with own stack trace.
  Multiple errors are finally thrown as an array of these errors with `.message = 'MULTIPLE_ERRORS'`
  and `.details = this` (the latter is for compatibility to former releases).
- _[cds@6.0.0]_ Public API for `cds.User.roles`: For example, this allows to construct new instances of `cds.User` like so:

  ```js
  let user = new cds.User ({ id:'me', roles:['admin'] })
  user.is('admin') //> true
  ```

- _[cds@6.0.0]_ Public API for `cds.context.tx`: This provides access to the current global root `tx`, if any.
  (This replaces the former undocumented `req._tx`)
- _[cds@6.0.0]_ Public API `cds.User.anonymous` and `cds.User.privileged`, which are sealed instances you can use directly
  instead of always passing `new cds.UserPrivileged`.
- _[cds@6.0.0]_ Public API `cds.context.http` to reliably access inbound HTTP `req` and `res` objects.
- _[cds@6.0.0]_ Persistent outbox now contains last error and timestamp of last attempt
- _[cds@6.0.0]_ Enable PUT requests for UPDATE queries with CQN for remote services
- _[cds@6.0.0]_ Support for new major version 2 of SAP Cloud SDK
- _[cds@6.0.0]_ Support for the `@assert.target` annotation for managed-to-one associations
- _[cds@6.0.0]_ Support for `FOR SHARE LOCK` on SAP HANA to acquire shared locks on the queried records so that the locked records stay intact until the transaction is committed or rolled back.
- _[cds@6.0.0]_ Consistent error information for remote batch requests
- _[cds@6.0.0]_ `cds.env` now supports expanding scalar `cds.requires` entries from `cds.requires.kinds` as follows:

  ```jsonc
  { "cds": {
    "requires": {
      "mtx-sidecar": true,
      "db": "sql",
      "kinds": {
        "sql": {/* detailed config for sql */},
        "mtx-sidecar": {/* detailed config */},
      }
    }
  }}
  ```

- _[cds@6.0.0]_ Support for mTLS in `enterprise-messaging-shared` and `message-queuing`
- _[cds@6.0.0]_ Allow empty publish and subscribe prefixes for SAP Event Mesh when using the format `cloudevents`
- _[cds@6.0.0]_ Custom type `sap.common.Locale` in common.cds
- _[cds@6.0.0]_ Ordering by aggregated value for draft-enabled active entity
- _[cds@6.0.0]_ `cds build` support for model provider service-based resource deployment.
- _[cds@6.0.0]_ Remote service:
  - Conversion of OData V2 (`"kind": "odata-v2"`) function and action results to OData V4 format
  - Conversion of binary data in CQN queries to `base64url` in URL and payload
  - Key predicate is omitted for single-key entities in resulting URL, for example, `GET /Foo(1)` instead of `GET /Foo(ID=1)`)
  - Support of views with parameters
- _[cds@6.0.0]_ Add `@odata.mediaContentType` if selecting stream property
- _[cds@6.0.0]_ Kubernetes service bindings: Support for `servicebinding.io` and SAP BTP Service Operator based bindings
- _[cds@6.0.0]_ `cds build` copies an existing `.npmrc` file located in the root or srv folder of your project into the deployment folder (usually `gen/srv`). This allows for dedicated npm configuration in cloud environments.  Can be switched off by cds build option `contentNpmrc`.
- _[cds@6.0.0]_ `cds build` copies an existing `.cdsrc.json` file located in the root or srv folder of your project into the deployment folder (usually `gen/srv`). The effective CDS configuration is created from the `.cdsrc.json` and CDS configuration defined in the `package.json` file. Can be switched off by cds build option `contentCdsrcJson`.
- _[cds@6.0.0]_ Beta OData URL to CQN parser (`cds.env.features.odata_new_parser = true`):
  - `@odata.context` is derived without using okra, not yet supported:
    - `$expand=*` query option
  - Support for actions and functions
  - Further `$apply` transformations supported
    - (nested) `concat` transformations
    - `orderBy` transformation
    - `top` & `skip` transformation
    - `identity` transformation
- _[cds@6.0.0]_ Log `BEGIN`/`COMMIT`/`ROLLBACK` commands when using SAP HANA as the underlying database
- _[cds@6.0.0]_ Binary data in payload is validated to be RFC-4648 and OData ABNF conformed
- _[cds@6.0.0]_ Support multiple media (streaming) properties in one entity
- _[cds@6.0.0]_ Support for annotation `@protocol:'none'` to mark services as internal
- _[cds@6.0.0]_ New build task aliases `java` and `nodejs` deprecating `java-cf`and `node-cf`, which are still supported for compatibility reasons.
- _[cds@6.0.0]_ New shutdown event sent by `cds serve` <Beta />
- _[cds@6.0.0]_ `$filter` in `$expand` for remote services
- _[cds@6.0.0]_ Mapping of aliases in $expand for remote services

### Changed {#jun-22-changed}

- _[cds-dk@4.9.7]_ Update `@sap/xsenv` to 3.3.1
- _[cds-dk@4.9.6]_ Include `@sap/cds` 5.9.6
- _[eslint-plugin-cds@2.4.1]_ Node.js 14 is now the minimum required Node.js version.  Version 12 is no longer supported.
- _[eslint-plugin-cds@2.4.1]_ Default CSN flavor in rules is `parsed`.
- _[cds-compiler@3.0.0]_ cds-compiler now requires Node 14.
- _[cds-compiler@3.0.0]_ `compile()` and its derivates now use `fs.realpath.native()` instead of `fs.realpath()`.
- _[cds-compiler@3.0.0]_ CDL parser:
  - Multi-line doc comments without leading `*` were inconsistently trimmed.
  - As before, a structure value for an annotation assignment in a CDL source is flattened,
    i.e. `@Anno: { foo: 1, @bar: 2 }` becomes `@Anno.foo: 1 @Anno.@bar: 2`.
    Now, the structure property name `$value` is basically ignored:
    `@Anno: { $value: 1, @bar: 2 }` becomes `@Anno: 1 @Anno.@bar: 2`.
    The advantage is that overwriting or appending the annotation value works as expected.
  - Keywords `not null` is only valid after `many String enum {...}` and no longer after `String`.
- _[cds-compiler@3.0.0]_ `@cds.persistence.skip` and `@cds.persistence.exists` are both copied to generated child artifacts
  such as localized convenience views, texts entities and managed compositions.
- _[cds-compiler@3.0.0]_ Update OData vocabularies 'Common', 'UI'.
- _[cds-compiler@3.0.0]_ (Sub-)Elements of localized convenience views can now be annotated,for example,`annotate localized.E:elem`.
- _[cds-compiler@3.0.0]_ `getArtifactCdsPersistenceName` now enforces the `csn` argument and can optionally have the `sqlDialect` passed in.
- _[cds-compiler@3.0.0]_ `getElementCdsPersistenceName` can optionally have the `sqlDialect` passed in.
- _[cds.java@1.25.0]_ By default, CDS Maven archetype now generates a CAP Java project for local development. To add dependencies required for production on CF, you can set the property `-DtargetPlatform=cloudfoundry`. Alternatively, you can enhance the project at any time with CDS Maven plugin goal `addTargetPlatform`.
- _[cds.java@1.25.0]_ The parameter `cds.watch.noStart` is removed from the goal `watch` of the `cds-maven-plugin` and replaced with the new goal `auto-build`.
- _[cds@6.0.0]_ `@sap/cds` can now be loaded from different install locations like any other module, i.e. `@require('@sap/cds')` will no longer return the same singleton instance.
- _[cds@6.0.0]_ SAP Cloud SDK is now only an optional dependency and must be installed manually
- _[cds@6.0.0]_ Improved `cds.context` implementation to use `AsyncLocalStorage` instead of plain `async_hooks` (-> [see Node.js docs](https://nodejs.org/api/async_context.html)); APIs stay the same.
- _[cds@6.0.0]_ Improved `cds.tx(tx=>{ ... })`: The new `tx` will be set as `cds.context.tx` for the function body's continuation,
  so all nested service or database operations will be executed within this transaction automatically.
- _[cds@6.0.0]_ Node.js 14.15 is now the minimum required Node.js version.  Version 12 is no longer supported.
- _[cds@6.0.0]_ Node.js 14.15 is now enforced on loading of `@sap/cds`, for example, on server startup.
- _[cds@6.0.0]_ Improve error messages in messaging management
- _[cds@6.0.0]_ `cds.env.requires` formerly inherited from `cds.env.requires.kinds`. This is not the case anymore; hence things like this worked before but don't anymore:

  ```js
  let sql = cds.requires.sql       //> is undefined now
  let sql = cds.requires.kinds.sql //> use this instead
  ```

  Alternatively you can add this to your cds config:

  ```json
  { "cds": { "requires": { "sql": true } }}
  ```

- _[cds@6.0.0]_ Details of errors from remote services are now in property `reason` (before it was `innererror`)
- _[cds@6.0.0]_ `innererror` is not removed from OData error response
- _[cds@6.0.0]_ The `file` option of file-based messaging is now on top level (before it was in `credentials`)
- _[cds@6.0.0]_ Optimized Search: `cds.env.features.optimized_search=true` is now the default behavior.
- _[cds@6.0.0]_ `cds build` no longer generates CF manifest files for Nodejs and HANA db deployer modules.
- _[cds@6.0.0]_ `cds build` no longer supports WebIDE Fullstack compatibility mode. Consequently HANA artifacts and service EDMX files for Fiori modules might no longer be correctly generated.
- _[cds@6.0.0]_ Remote services: Batched `GET` requests will not fetch CSRF tokens
- _[cds@6.0.0]_ CQN now uses `xpr` correctly instead of brackets in `where`
- _[cds@6.0.0]_ `process.exit` is called again by `cds run/serve` and `watch`, to gain a reliable `exit` event for cleanup tasks.  Before, this would be spoiled by apps that do not shut down the event loop properly.
- _[cds@6.0.0]_ `cds build` no longer filters `./` file dependencies from package.json in the build output.
- _[cds@6.0.0]_ Fiori preview no longer supports URL pattern with `service` and `entity` query parameters, for example, `$fiori-preview?service=...&entity=...`.  These URLs were created back in `@sap/cds` 3.x.
- _[cds@6.0.0]_ `cds build` no longer copies the `node_modules` folder into the deployment folder (usually `gen/db/**` and `gen/srv/**`).
- _[cds@6.0.0]_ Set default tenant to `undefined` in single-tenant mode
- _[cds@6.0.0]_ Handle foreign keys of to-one associations which should be set to `null` on db layer
- _[cds@6.0.0]_ `cds build` uses the native `fs` functions instead of `fs-extra`.
- _[cds@6.0.0]_ `cds build` supports initial data in CSV files that are located in any 'csv' or 'data' subfolder of some CDS model file. This also implies CSV files stored in reuse modules. Now, this behaviour is consistent with SQLite deployment. If the location of some CSV file has changed, a deployment error might be returned. In that case previously deployed `hdbtabledata` files have to be undeployed.
- _[cds@6.0.0]_ `cds deploy` reads Cloud Foundry file `config.json` to get org and space information.
- _[cds@6.0.0]_ New REST adapter replaced old (limited) implementation
- _[cds@6.0.0]_ Default behaviour for runtime integrity checks. From now on no integrity checks will be done by default.
  Note that this is a breaking change for applications that rely on automatic integrity checks by runtime. We recommend to use `cds.env.features.assert_integrity`: `db` to switch on database integrity constraints. The value `app` can be used as fallback to previous behaviour.
- _[cds@6.0.0]_ `cds build` no longer copies `.env` or `default-env.json` files into the deployment folder.
- _[cds@6.0.0]_ OData `POST`, `PATCH` and `PUT` requests as well as draft-related `draftEdit` and `draftActivate` actions are now followed by an additional `READ` request to the application service. Consequently affected functionality:
  - It is now sufficient to have a custom `READ` handler in order to adjust the response (for example, to handle virtual properties) of the modification request.
  - A user is now required to be authorized to read updated data for example, a user having a role restricted with "INSERT-only" annotation pattern will get empty results in response to `POST` request.
  - For compatibility reasons, `req._` of the modification request is uplinked to `req._` of the follow-up `READ` request so that one still can access original `req._.req/res` request objects of the modification request within the corresponding `READ` handlers.
  - Modification logs are now followed by corresponding access logs.
  - More details can be found in cds v6.0.0 release notes.
- _[cds@6.0.0]_ Message for PreconditionFailedError is now configurable in messages.properties
- _[cds@6.0.0]_ Remove circular references in Kibana logging
- _[cds@6.0.0]_ Error sanitization in production is skipped for custom errors with HTTP code `5xx`. From now on, it's possible for an app developer to return any error message to the client.
  Note that this is a breaking change for applications that rely on error sanitization for custom errors in production. The behaviour of errors thrown by CAP framework is unchanged.

### Fixed {#jun-22-fixed}

- _[cds-dk@4.9.6]_ `cds login` (and `cds extend`, `cds activate` if previously logged in) now properly renew token URL
- _[cds-dk@4.9.6]_ Improved logging during those commands
- _[cds-compiler@2.15.4]_ for.odata:
  - Fix derived type to scalar type resolution with intermediate `many`.
- _[cds-compiler@2.15.4]_ to.edm(x):
  - (V4 structured) Fix key paths in combination with `--odata-foreign-keys`.
  - Add `Edm.PrimitiveType` to `@odata.Type`.
  - (V4 JSON) Render constant expressions for `Edm.Stream` and `Edm.Untyped`.
  - Fix a bug in target path calculation for `NavigationPropertyBinding`s to external references.
  - Render inner annotations even if `$value` is missing.
- _[cds-compiler@2.15.4]_ Update OData vocabularies 'Common', 'UI'.
- _[cds-compiler@2.15.4]_ to.sql/to.hdbcds/to.hdi: "type of"s in `cast()`s could lead to type properties being lost.
- _[cds.java@1.25.0]_ Fixed a bug, causing values imported from CSV files for fields having type `UUID` and annotated with `@odata.Type: 'Edm.String'` being normalized.
- _[cds.java@1.25.0]_ Fixed a bug, causing issues when searching for strings containing backslashes in OData V2.
- _[cds.java@1.25.0]_ Fixed a bug, causing the enterprise messaging tenants update failed when any broken tenant are in the tenant list.
- _[cds4j@1.29.0]_ Fix generation of values for managed elements, when updating a projection without having the managed elements projected
- _[cds4j@1.29.0]_ Code generator: Ensure static field names reflect @cds.java.name annotation
- _[cds4j@1.29.0]_ Fix truncation of timestamps before epoch on Java 8 (JDK-8134928)
- _[cds@6.0.0]_ We don't rely on `global.cds` anymore -> allows to load and correctly work with multiple versions of `cds`
- _[cds@6.0.0]_ Improved shutdown for AMQP connections and file listeners
- _[cds@6.0.0]_ Using `CQL` with a tagged template string `SELECT from Foo { null as boo }` threw an exception.
- _[cds@6.0.0]_ In case of `MULTIPLE_ERRORS` throw an `Error` instead of an object
- _[cds@6.0.0]_ `cds build` ensures correct precedence of feature annotations. Fixes `Duplicate assignment` compilation errors.
- _[cds@6.0.0]_ Compatibility with former support to find service `@impl: 'relative/to/cdw'`.
- _[cds@6.0.0]_ Views on views with parameters where erroneously inherited params through `cds.linked()`.
- _[cds@6.0.0]_ Authentication: Return HTTP `404 Not Found` rather than `204 No Content` status code for invalid requests.
  For example, given the following request `/ReqAdmin(1)/toIntermediate/toa` and assuming that the `toIntermediate` instance does not exist, the runtime returned an HTTP `204 No Content` success status response code indicating that the request has succeeded. In such scenarios, now the HTTP `404 Not Found` status code is returned rather than `204 No Content`.
- _[cds@6.0.0]_ Errors from HTTP requests sent via `cds.test.axios` now are the original Axios errors, i.e. including properties like `request` and `response`, with stack traces from caller.
- _[cds@6.0.0]_ Errors constructed and thrown by `req.reject()` now have a stack starting at the code calling `req.reject()`.
- _[cds@6.0.0]_ Auth annotations `@restrict` and `@requires` with empty array do not allow access anymore
- _[cds@6.0.0]_ Delete on restricted singleton caused request to fail
- _[cds@6.0.0]_ Add workaround of typescript not complete literal unions, specially when union strings.
- _[cds@6.0.0]_ Accidental handling of non-proxy entities as they would have been proxies (`cds.env.odata.proxies`) in expands
- _[cds@6.0.0]_ Boolean keys are properly parsed into JS boolean values
- _[cds@6.0.0]_ Navigation path segments with aliased keys in structured mode (OData flavors `w4` and `x4`) when using beta OData URL to CQN parser (`cds.env.features.odata_new_parser`)
- _[cds@6.0.0]_ All entities in `@sap/cds/common` have now proper CDS doc comments
- _[cds@6.0.0]_ `cds build` uses `package.json` and `package-lock.json` files located in `srv` folder for deployment if existing. Before, `package.json` and `package-lock.json` files of the project root folder have always been taken.
- _[cds@6.0.0]_ Pass options from `cds.parse.expr` to `cdsc.parse.expr`.
- _[cds@6.0.0]_ Avoid error that is caused for example, in a streaming scenario when there is an issue while processing the stream. Trying to change/send the response object could cause a crash because the response was sent already.
- _[cds@6.0.0]_ Correct URL generation for `Integer64` and `Decimal` for remote services
- _[cds@6.0.0]_ Operation parameters from structured type and annotated with @open are not filtered from the input query
- _[cds@6.0.0]_ Services are secured by default in production. Can be disabled via feature flag `cds.env.auth.restrict_all_services: false` or by using `mocked-auth`.
- _[cds@6.0.0]_ Optimized Search: Exception when searching on views using built-in SQL SAP HANA functions
- _[cds@6.0.0]_ In some cases, custom error handlers were not called for rest
- _[cds@6.0.0]_ `cds build` adds newline at EOF for `hdbmigrationtable` files
- _[cds@6.0.0]_ Static values in on condition were ignored when inserting on navigation
- _[cds@6.0.0]_ Removed entity key validation by POST request in rest
- _[cds@6.0.0]_ `$count=false` returned count
- _[cds@6.0.0]_ `odata_new_parser`: `format=json` allowed as query parameter, other formats not supported and returning 501, trailing `?` allowed e.g. `/Employees?`
- _[cds@6.0.0]_ `odata_new_parser`: Piped use of same transformations is now supported, like `/Students?$apply=filter(BIRTHYEAR ge 2000)/groupby((UNIVERSITY),aggregate(SUBJECT with countdistinct as distinctSubjects))/filter(UNIVERSITY eq 'Hamburg')`
- _[cds@6.0.0]_ `odata_new_parser`: Behavior of piped transformations while using `topcount` or `bottomcount` is now correct
- _[cds@6.0.0]_ Better error message for missing `exists` predicate in `@restrict.where`
- _[cds@6.0.0]_ Reading raw Binary data provided as a `base64` (standard or url-safe) string by means of a `$value` query option
- _[cds@6.0.0]_ Selecting a navigation with `$select` ended up in database error
- _[cds@6.0.0]_ `cds.compile` no longer fails for cds sources that contain the `file:` pattern
- _[cds@6.0.0]_ `$select=IsActiveEntity` did not work on draft enabled entity, when requesting active data via navigation
- _[cds@6.0.0]_ not equal operator `<>` treated the same way as `!=`
- _[cds@6.0.0]_ `cds.localize` now respects custom i18n file names (which is not recommended though)
- _[cds@6.0.0]_ `cds version` now handles array-valued entries for `folders.db`and `folders.srv` gracefully when looking for MTX sidecar
- _[cds@6.0.0]_ OData access of entities named `get` and `set`
- _[cds@6.0.0]_ missing brackets for OR condition in `.where()` when requesting by navigation
- _[cds@6.0.0]_ `cds build` now correctly supports nodejs apps that do not have a service module defined. In these cases the build task's _src_ folder has to be configured as "."
- _[cds@6.0.0]_ `cds build <dir>` is now correctly executed if called by npm script or mta build.
- _[cds@6.0.0]_ `cds deploy` now shows a better error message on INSERT errors (on SQLite).
- _[cds@5.9.8]_ Application model is now again properly updated after extension activation
- _[cds@5.9.8]_ Avoid crashes during `cds version` when `folders.db` or `folders.srv` are array-valued instead of strings
- _[cds@5.9.8]_ `cds build` correctly validates MTX extension allow lists and doesn't log false positive warning messages
- _[cds@5.9.7]_ Deleting a parent will delete all compositions, also texts
- _[cds@5.9.7]_ Views with aliased elements in `orderBy`
- _[cds-odata-v2-adapter-proxy@1.8.21]_ Add `Type` suffix to fix `__metadata.type` for parameterized entities (datajs did skip date type conversion)
- _[cds-odata-v2-adapter-proxy@1.8.21]_ Fix parameterized entities navigation links
- _[cds-odata-v2-adapter-proxy@1.8.21]_ Enhance Fiori Elements example apps
- _[cds-odata-v2-adapter-proxy@1.8.20]_ Change README on App Router compression flag `compressResponseMixedTypeContent`
- _[cds-odata-v2-adapter-proxy@1.8.20]_ Fill and process surrogate key `ID__` correctly in case of analytical queries
- _[cds-odata-v2-adapter-proxy@1.8.20]_ Add an example Fiori Elements applications showcasing hierarchical `TreeTable` usage
- _[cds-odata-v2-adapter-proxy@1.8.20]_ Rework UI application examples (basic, draft and hierarchy apps)

### Removed {#jun-22-removed}

- _[cds-compiler@3.0.0]_ All v2 deprecated flags.
- _[cds-compiler@3.0.0]_ Keyword `masked`.
- _[cds-compiler@3.0.0]_ CDL parser: `*` is not parsed anymore as argument to all SQL functions;
  it is now only allowed for `count`, `min`, `max`, `sum`, `avg`, `stddev`, `var`.
- _[cds-compiler@3.0.0]_ All non-SNAPI options.
- _[cds@6.0.0]_ Deprecated option to send synchronous requests via `srv.emit()` -> use `srv.send()` for that
- _[cds@6.0.0]_ Deprecated feature flag `cds.env.features.implicit_sorting`
- _[cds@6.0.0]_ Deprecated feature flag `cds.env.features.update_managed_properties`
- _[cds@6.0.0]_ Deprecated feature flag `cds.env.features.resolve_views`
- _[cds@6.0.0]_ Deprecated feature flag `cds.env.features.spaced_columns`
- _[cds@6.0.0]_ Deprecated feature flag `cds.env.features.throw_diff_error`
- _[cds@6.0.0]_ Deprecated feature flag `cds.env.features.delay_assert_deep_assoc`
- _[cds@6.0.0]_ Deprecated feature flag `cds.env.features.auto_fetch_expand_keys`
- _[cds@6.0.0]_ Deprecation warning for query parameters `sap-valid-from` and `sap-valid-to`
- _[cds@6.0.0]_ Built-in graphql support &rarr; moved to new `@sap/cds-graphql`
- _[cds@6.0.0]_ Deprecated feature flag `cds.env.features.extract_vals`
- _[cds@6.0.0]_ Support for CQN `where in` syntax `{ val: [1, 2, 3] }` without `list`. Use `{ list: [{ val: 1 }, { val: 2 }, { val: 3 }] }` instead.
- _[cds@6.0.0]_ Support for selects in restrict entries, for example, `where : 'exists (select 1 from MyTable where a = b)'` is not allowed anymore
- _[cds@6.0.0]_ Input validation for deep `INSERT`/`UPDATE` for associations in the service layer
- _[cds@6.0.0]_ Support for `@odata.contained` annotation. Use Compositions instead.
- _[cds@6.0.0]_ Support for `@odata.on.insert/update` annotation. Use `cds.on.insert/update` instead.
- _[cds@6.0.0]_ Support for expressions in references, for example: `ref: ['foo as bar']`).
- _[cds@6.0.0]_ Generic support of `$expand` and `$select` OData query options for custom actions and functions

## May 2022

### Added {#may-22-added}

- _[vscode-cds@4.5.6]_ file icon for CDS files
- _[vscode-cds@4.5.5]_ support syntax highlighting for escape sequences in template strings
- _[cds-compiler@2.15.0]_ A new warning is emitted if `excluding` is used without a wildcard, since this does
  not have any effect.
- _[cds-compiler@2.15.0]_ All scalar types can now take named arguments, for example, `MyString(length: 10)`.
  For custom scalar types, one unnamed arguments is interpreted as length, two arguments are interpreted
  as precision and scale, for example, `MyDecimal(3,3)`.
- _[cds-compiler@2.15.0]_ If the type `sap.common.Locale` exists, it will be used as type for the `locale` element
  of generated texts entities.  The type must be a `cds.String`.
- _[cds-compiler@2.15.0]_ to.cdl: Extend statements (from `extensions`) can now be rendered.
- _[cds-compiler@2.15.0]_ Add OData vocabulary 'Hierarchy'.
- _[cds-compiler@2.15.0]_ CDL: New associations can be published in queries, e.g. `assoc : Association to Target on assoc.id = id`
- _[cds.java@1.24.0]_ Full support for the [Spring Boot Developer Tools](https://docs.spring.io/spring-boot/docs/current/reference/html/using.html#using.devtools) allowing much easier and faster development. This includes instant code replacement in test applications deployed to the cloud.
- _[cds.java@1.24.0]_ The goal `watch` of the `cds-maven-plugin` supports the Spring-Boot Developer Tools for a quicker application restart after changes in the CDS model.
- _[cds.java@1.24.0]_ The `$metadata` endpoints now stream the original EDMX directly, without serializing the internal Olingo EDMX representation. Beside much better performance this allows to make use of OData dynamic expressions now.
- _[cds.java@1.24.0]_ Added a new event `ApplicationStopped` to the `ApplicationLifecycleService`, which can be used to stop background tasks. Note that this event is not guaranteed to be emitted, when the application terminates. It is first and foremost intended to stop background tasks when Spring closes its ApplicationContext.
- _[cds.java@1.24.0]_ `UserInfo.getAdditionalAttributes()` now contains all token claims such as `email` or `aud` in case of IAS authentication.
- _[cds.java@1.24.0]_ Spring's `@Order` annotation on event handler classes is now respected and event handlers are registered in that order.
- _[cds.java@1.24.0]_ Enhanced annotations `@cds.on.insert` and `@cds.on.update` with following features:
  - Static values can be assigned
  - Arbitrary user context variables can be assigned, for example, `@cds.on.insert: $user.given_name`. The context variables must be mapped from the [exposed SAML assertion attributes](https://blogs.sap.com/2020/07/24/mapping-of-saml-attributes-with-xsuaa-jwt-in-cloud-foundry/).
- _[cds.java@1.24.0]_ Key elements of type `String` that are annotated with `@cds.on.insert: $uuid` now get a string representation of a UUID assigned.
- _[cds.java@1.24.0]_ Full support for the [Spring Boot Developer Tools](https://docs.spring.io/spring-boot/docs/current/reference/html/using.html#using.devtools) allowing much easier and faster development. This includes instant code replacement in test applications deployed to the cloud.
- _[cds.java@1.24.0]_ The goal `watch` of the `cds-maven-plugin` supports the Spring-Boot Developer Tools for a quicker application restart after changes in the CDS model.
- _[cds.java@1.24.0]_ Added a new event `ApplicationStopped` to the `ApplicationLifecycleService`, which can be used to stop background tasks. Note that this event is not guaranteed to be emitted, when the application terminates. It is first and foremost intended to stop background tasks when Spring closes its ApplicationContext.
- _[cds.java@1.24.0]_ `UserInfo.getAdditionalAttributes()` now contains all token claims such as `email` or `aud` in case of IAS authentication.
- _[cds.java@1.24.0]_ Spring's `@Order` annotation on event handler classes is now respected and event handlers are registered in that order.
- _[cds.java@1.24.0]_ Enhanced annotations `@cds.on.insert` and `@cds.on.update` with following features:
  - Static values can be assigned
  - Arbitrary user context variables can be assigned, e.g. `@cds.on.insert: $user.given_name`. The context variables must be mapped from the [exposed SAML assertion attributes](https://blogs.sap.com/2020/07/24/mapping-of-saml-attributes-with-xsuaa-jwt-in-cloud-foundry/).
- _[cds4j@1.28.0]_ Support key paths and auto cast in `CdsData`: `getPath`, `putPath`, `containsPath`, `removePath`
- _[cds4j@1.28.0]_ PostgreSQL - support `Select` with `lock(0)` (`SELECT FOR UPDATE ... NOWAIT`)
- _[cds4j@1.28.0]_ Support changing targets of to-one associations/compositions
- _[cds4j@1.28.0]_ Draft: support draft associations to entities with compound keys
- _[cds-mtx@2.5.6]_ Tenant upgrades can now scale beyond a single database.
- _[cds-mtx@2.5.6]_ The tenant IDs are now exposed in the provisioning service (`/mtx/v1/provisioning/tenantIds`).
- _[cds-mtx@2.5.6]_ The SaaS Provisioning Service `UPDATE` event type is now also supported.
- _[cds-mtx@2.5.6]_ By setting cds environment `mtx.provisioning.lazymetadatacontainercreation: true`, the creation of the `__META__` container can be postponed to the first onboarding again. In case the onboarding request contains additional parameters for the container creation, these parameters will also be used for the creation of the `__META__` tenant, except if the parameters are also set via cds environment `mtx.provisioning.metadatacontainer`.

### Changed {#may-22-changed}

- _[cds-dk@4.9.5]_ Include `@sap/cds` 5.9.5
- _[cds-dk@4.9.5]_ Include `@sap/cds-compiler` 2.15.2
- _[cds-dk@4.9.4]_ Include `@sap/cds` 5.9.4
- _[cds-dk@4.9.4]_ Bump `axios` to latest (CVE-2022-1214)
- _[vscode-cds@4.5.6]_ updated included capire docs
- _[cds-compiler@2.15.0]_ to.edm(x):
  - perform inbound qualification and spec violation checks as well as most/feasible EDM preprocessing steps
    on requested services only.
  - Open up `@odata { Type, MaxLength, Precision, Scale, SRID }` annotation.
    The annotations behavior is defined as follows:
    - The element/parameter must have a scalar CDS type. The annotation is not applied on named types
      (With the V2 exception where derived type chains terminating in a scalar type are resolved).
    - The value of `@odata.Type` must be a valid `EDM` type for the rendered protocol version.
    - If `@odata.Type` can be applied, all canonic type facets (`MaxLength`, `Precision`, `Scale`, `SRID`) are
      removed from the Edm Node and the new facets `@odata { MaxLength, Precision, Scale, SRID }` are applied.
      Non Edm type conformant facets are ignored (eg. `@odata { Type: 'Edm.Decimal', MaxLength: 10, SRID: 0 }`).
    - Type facet values are not evaluated.
  - V2: Propagate `@Core.MediaType` annotation from stream element to entity type if not set.
- _[cds-compiler@2.15.0]_ to.edm: Render constant expressions in short notation.
- _[cds-compiler@2.15.0]_ Update OData Vocabularies: 'Common', 'Graph', 'Validation'.
- _[cds.java@1.24.0]_ The CDS model is no longer reloaded every time when opening a new Request Context. Only the outmost Request Context initially loads the CDS model and propagates it to all inner Request Contexts. The only scenario where the model is still reloaded is when the new Request Context uses a different tenant. This scenario also requires a new ChangeSet Context to be opened in addition.
- _[cds.java@1.24.0]_ If a ChangeSet Context is opened without an existing Request Context the latter is opened implicitly as well.
- _[cds.java@1.24.0]_ HTTP Headers from the `$batch` request are now propagated to the inner requests, if they do not yet exist there. This means those headers are now available through the `context.getParameterInfo().getHeaders()` method, when processing a request defined in a `$batch` request.
- _[cds.java@1.24.0]_ `UserInfo.getName()` now returns the subject of the token (property `sub`) in case of IAS authentication.
- _[cds.java@1.24.0]_ When a new request context is opened with a modified `ParameterInfo`, null values and empty strings as correlation id in the `ParameterInfo` object are not interpreted as an intention to overwrite an existing correlation id in the MDC, anymore, and therefore are silently ignored
- _[cds.java@1.24.0]_ The CDS model is no longer reloaded every time when opening a new Request Context. Only the outmost Request Context initially loads the CDS model and propagates it to all inner Request Contexts. The only scenario where the model is still reloaded is when the new Request Context uses a different tenant. This scenario also requires a new ChangeSet Context to be opened in addition.
- _[cds.java@1.24.0]_ If a ChangeSet Context is opened without an existing Request Context the latter is opened implicitly as well.
- _[cds.java@1.24.0]_ The `$metadata` endpoints now stream the original EDMX directly, without serializing the internal Olingo EDMX representation. Beside much better performance this allows to make use of OData dynamic expressions now.
- _[cds.java@1.24.0]_ HTTP Headers from the `$batch` request are now propagated to the inner requests, if they do not yet exist there. This means those headers are now available through the `context.getParameterInfo().getHeaders()` method, when processing a request defined in a `$batch` request.
- _[cds.java@1.24.0]_ `UserInfo.getName()` now returns the subject of the token (property `sub`) in case of IAS authentication.
- _[cds.java@1.24.0]_ When a new request context is opened with a modified `ParameterInfo`, null values and empty strings as correlation id in the `ParameterInfo` object are not interpreted as an intention to overwrite an existing correlation id in the MDC, anymore, and therefore are silently ignored
- _[cds4j@1.28.0]_ Deprecate path access via `CdsData:get`, instead use `getPath`
- _[cds4j@1.28.0]_ Override flat FK values with structured ones, if both are present in payload of Insert statements
- _[cds4j@1.28.0]_ Deep Update:
  - Don't allow to set composition to existing target entity
  - Ignore update data for non-cascading associations

### Fixed {#may-22-fixed}

- _[cds-dk@4.9.5]_ `cds init` uses latest Maven Java archetype version 1.24.0 for creating Java projects.
- _[vscode-cds@4.5.5]_ find references could have shown wrong entries from localized context
- _[cds-compiler@2.15.2]_ Option `cdsHome` can be used instead of `global.cds.home` to specify the path to `@sap/cds/`.
- _[cds-compiler@2.15.2]_ to.edm(x):
  - Set anonymous nested proxy key elements to `Nullable:false` until first named type is reached.
  - Enforce `odata-spec-violation-key-null` on explicit foreign keys of managed primary key associations.
  - Proxies/service cross references are no longer created for associations with arbitrary ON conditions.
    Only managed or `$self` backlink association targets are proxy/service cross reference candidates.
  - Explicit foreign keys of a managed association that are not a primary key in the target are exposed in the the proxy.
  - If an association is primary key, the resulting navigation property is set to `Nullable:false` in structured mode.
- _[cds-compiler@2.15.0]_ to.cdl:
  - Annotations of elements of action `returns` are now rendered as `annotate` statements.
  - Annotations on columns (query sub-elements) were not always rendered.
  - Doc comments on bound actions were rendered twice.
  - Unapplied annotations for action parameters were not rendered.
  - Unions and joins are correctly put into parentheses.
  - Add parentheses around certain expressions in function bodies that require it, such as `fct((1=1))`.
- _[cds-compiler@2.15.0]_ to.edm(x):
  - Fix a bug in top level and derived type `items` exposure leading to undefined type rendering.
  - Fix a naming bug in type exposure leading to false reuse types, disguising individual type
    modifications (such as annotations, (auto-)redirections, element extensions).
  - Ignore `@Aggregation.default`.
  - Consolidate message texts and formatting.
  - Fix navigation property binding in cross service rendering mode.
  - Remove partner attribute in proxy/cross service navigations.
- _[cds-compiler@2.15.0]_ Core engine (function `compile`):
  - Annotations for new columns inside `extend projection` blocks were not used.
  - Extending an unknown select item resulted in a crash.
  - Extending a context/service with columns now correctly emits an error.
  - Unmanaged `redirected to` in queries did not check whether the source is an association.
- _[cds-compiler@2.15.0]_ parseCdl: `extend <art> with enum {...}` incorrectly threw a compiler error.
- _[cds-compiler@2.15.0]_ API: `compile()` used a synchronous call `fs.realpathSync()` on the input filename array.
  Now the asynchronous `fs.realpath()` is used.
- _[cds-compiler@2.15.0]_ On-conditions in localized convenience views may be incorrectly rewritten if an element
  has the same as a localized entity.
- _[cds-compiler@2.15.0]_ to.sql/hdi/hdbcds:
  - No referential constraint is generated for an association if its parent
  or target entity are annotated with `@cds.persistence.exists: true`.
  - Fix rendering of virtual elements in subqueries
  - Correctly process subqueries in JOINs
- _[cds-compiler@2.15.0]_ to.sql/hdi: Queries with `UNION`, `INTERSECT` and similar in expressions are now enclosed in parentheses.
- _[cds.java@1.24.0]_ Fixed a bug, causing the audit log service to send a message without a tenant, instead of properly using the provider tenant.
- _[cds.java@1.24.0]_ Fixed a bug, causing issues with OData V4 URLs, which contained the service path also in other parts of the URL (e.g. the domain).
- _[cds.java@1.24.0]_ Fixed a bug, causing issues with OData V4 URLs, which contained filters on properties that have reserved identifiers as prefix such as `INF`.
- _[cds.java@1.24.0]_ Fixed a bug introduced with version `1.23.0`, causing connection issues with MTX sidecar in context of DwC.
- _[cds.java@1.24.0]_ Fixed a bug, causing the tenant provider service to deliver only subscribed tenants but the update failed tenants are also expected.
- _[cds.java@1.24.0]_ Fixed a bug, causing issues when receiving extended declared events via the messaging service.
- _[cds.java@1.24.0]_ Fixed a bug, causing the audit log service to send a message without a tenant, instead of properly using the provider tenant.
- _[cds.java@1.24.0]_ Fixed a bug, causing issues with OData V4 URLs, which contained the service path also in other parts of the URL (for example, the domain).
- _[cds.java@1.24.0]_ Fixed a bug, causing issues with OData V4 URLs, which contained filters on properties that have reserved identifiers as prefix such as `INF`.
- _[cds.java@1.24.0]_ Fixed a bug introduced with version `1.23.0`, causing connection issues with MTX sidecar in context of DwC.
- _[cds.java@1.24.0]_ Key elements of type `String` that are annotated with `@cds.on.insert: $uuid` now get a string representation of a UUID assigned.
- _[cds4j@1.28.0]_ Fix data duplication issue when to-many expand is applied to many-to-many associations
- _[cds4j@1.28.0]_ Fix exceptions while serializing streaming elements to JSON
- _[cds4j@1.28.0]_ Code generator:
  - Ensure technical entities are identified correctly
  - Don't generate interfaces for technical entities
- _[cds4j@1.28.0]_ Move element default values from `CdsSimpleType:defaultValue` to `CdsElement:defaultValue`
- _[cds4j@1.28.0]_ Fix deep update with InputStreams in target data
- _[cds4j@1.28.0]_ PostgreSQL - fix handling of elements with type `cds.Binary`
- _[cds@5.9.6]_ Ignored requests in batch requests
- _[cds@5.9.6]_ `pool` module for logger facade is separated from `hana` database logger. Timeout error by acquiring client from pool is now enhanced with `_poolState` providing current pool attributes.
- _[cds@5.9.6]_ Multiple errors did not have correct HTTP response status code
- _[cds@5.9.6]_ `POST|PUT|PATCH` requests with `charset` directive in `Content-Type` header (for example, `Content-Type: application/json; charset=utf-8`) no longer issues an error "Invalid content type" in REST adapters
- _[cds@5.9.6]_ Call hana procedure:
  - accepted are any symbols in a procedure name if it is delimited with a double quotation (`"`)
  - fixed results for table output parameters when using `@sap/hana-client`; **limitation**: output parameters in a `CALL` statement must follow the same order used in a stored procedure definition
- _[cds@5.9.6]_ `@odata.context` considers `cds.env.odata.contextAbsoluteUrl` when requesting an OData Service
- _[cds@5.9.5]_ `HDB_TCP_KEEP_ALIVE_IDLE` config
- _[cds@5.9.5]_ A combination of `!=` operator and `or` in `where` clauses of `@restrict` annotations or when adjusting `req.query` in custom handlers (OData services only)
- _[cds@5.9.5]_ Programmatic calls to bound actions/functions do have keys in `req.data` again if compat flag `cds.env.features.keys_in_data_compat` is set
- _[cds@5.9.4]_ Error messages are improved if no `passport` module was found or if no `xsuaa` service binding is available
- _[cds@5.9.4]_ Issue fixed for `srv.get()`. It was returning `TypeError` in plain REST usage for external services, for example, `srv.get('/some/arbitrary/path/111')`
- _[cds@5.9.4]_ Allow unrestricted services to run unauthenticated, removing the `Unable to require required package/file "passport"` error. Totally not recommended in production.  Note that though this restores pre 5.9.0 behavior, this will come again starting in 6.0.
- _[cds@5.9.4]_ Audit logging of sensitive data in a composition child if its parent is annotated with `@PersonalData.EntitySemantics: 'Other'` and has no data privacy annotations other than `@PersonalData.FieldSemantics: 'DataSubjectID'` annotating a corresponding composition, for example:

  ```js
    annotate Customers with @PersonalData : {
      DataSubjectRole : 'Address',
      EntitySemantics : 'Other'
    } {
      addresses @PersonalData.FieldSemantics: 'DataSubjectID';
    }
    annotate CustomerPostalAddress with @PersonalData : {
      DataSubjectRole : 'Address',
      EntitySemantics : 'DataSubject'
    } {
      ID @PersonalData.FieldSemantics : 'DataSubjectID';
      street @PersonalData.IsPotentiallyPersonal;
      town @PersonalData.IsPotentiallySensitive;
    }
  ```

- _[cds-mtx@2.5.6]_ When using a custom folder setup for native artifacts for HDI, the `cfg` folder is now correctly included for the HDI deployment
- _[cds-odata-v2-adapter-proxy@1.8.19]_ Don't propagate `host` header to forwarded calls.
- _[cds-odata-v2-adapter-proxy@1.8.18]_ Propagate all headers to forwarded calls.
- _[cds-odata-v2-adapter-proxy@1.8.17]_ Filter out annotation elements in response data starting with `odata.` or including `@odata.`.
- _[cds-odata-v2-adapter-proxy@1.8.17]_ Elements starting with `@` are excluded as before.
- _[cds-odata-v2-adapter-proxy@1.8.17]_ Propagate special headers to forwarded calls (i.e. starting with `dwc`).

## April 2022

### Added {#apr-22-added}

- _[eslint-plugin-cds@2.4.0]_ Rule report recycling ensures that rules are created/run only once for the root model
- _[cds-compiler@2.14.0]_ cdsc:
  - `--quiet` can now be used to suppress compiler output, including messages.
  - `--options <file.json>` can be used to load compiler options. A JSON file is expected. Is compatible to CDS `package.json`
    and `.cdsrc.json` by first looking for `cdsc` key in `cds`, then for a `cdsc` key and otherwise uses the full JSON file.
  - `--[error|warn|info|debug] id1,id2` can be used to reclassify specific messages.
- _[cds-compiler@2.14.0]_ Add OData Vocabularies: 'DataIntegration', 'JSON'.

### Changed {#apr-22-changed}

- _[cds-dk@4.9.3]_ `cds init` uses latest Maven Java archetype version 1.23.1 for creating Java projects.
- _[cds-dk@4.9.3]_ Include `@sap/cds` 5.9.3
- _[cds-dk@4.9.2]_ Include `moment` 2.29.2, fixing CVE-2022-24785
- _[cds-dk@4.9.2]_ Include `@sap/cds` 5.9.2
- _[cds-dk@4.9.2]_ Include `@sap/eslint-plugin` 2.3.5
- _[cds-dk@4.9.1]_ `cds init` uses latest Maven Java archetype version 1.23.0 for creating Java projects.
- _[cds-dk@4.9.1]_ Include `@sap/cds` 5.9.1
- _[cds-dk@4.9.1]_ Include `@sap/cds-compiler` 2.13.8
- _[cds-dk@4.9.1]_ Include `@sap/eslint-plugin` 2.3.4
- _[eslint-plugin-cds@2.4.0]_ Rule `no-dollar-prefixed-names` no longer acts on compiler warning messages
- _[eslint-plugin-cds@2.3.5]_ Catch root model compilation errors and do not try again on every file (-> long lint times for broken models)
- _[eslint-plugin-cds@2.3.5]_ Add to lint reports with rules marked with '!'
- _[vscode-cds@4.5.4]_ `CAP Release Notes` page now persists its state
- _[cds-compiler@2.14.0]_ Update OData Vocabularies: 'UI'.
- _[cds-mtx@2.5.5]_ Improved logging in the context of requesting tokens.
- _[cds-mtx@2.5.4]_ If enabled via `cds.env.mtx.security.metadata-scope-checks`, the v2 CSN and EDMX APIs, as well as all metadata APIs are now scope-checked for `mtdeployment`.
- _[cds-mtx@2.5.4]_ Tokens sent to the command-line client are now reduced in scope for security reasons.

### Fixed {#apr-22-fixed}

- _[cds-dk@4.9.3]_ `cds add cf-manifest` now uses the correct `application` plan for the `xsuaa` service
- _[cds-dk@4.9.3]_ `cds login`, `cds activate`: correctly include response in auth errors
- _[cds-dk@4.9.3]_ The SAP HANA and MTA options in the project wizard in BAS now work again
- _[vscode-cds@4.5.4]_ Syntax highlighting in Business Application Studio
- _[cds-compiler@2.14.0]_ to.cdl:
  - Delimited identifiers as the last elements of arrays in annotation values are now
    rendered with spaces in between, to avoid accidentally escaping `]`.
  - Identifiers in includes and redirection targets were not quoted if they are reserved keywords.
- _[cds-compiler@2.14.0]_ to.edm(x): Correctly rewrite `@Capabilities.ReadRestrictions.ReadByKeyRestrictions` into
  `@Capabilities.NavigationPropertyRestriction` in containment mode.
- _[cds.java@1.23.1]_ The `cds-feature-auditlog-v2` now sends audit logs to the audit server in the context of the provider tenant if the tenant in `UserInfo` is `null`.
- _[cds.java@1.23.1]_ The runtime now returns a server error with a meaningful error message when a transaction unexpectedly fails to open.
- _[cds.java@1.23.1]_ The `cds-feature-auditlog-v2` now sends audit logs to the audit server in the context of the provider tenant if the tenant in `UserInfo` is `null`.
- _[cds.java@1.23.1]_ The runtime now returns a server error with a meaningful error message when a transaction unexpectedly fails to open.
- _[cds@5.9.3]_ Since 5.8.2 `req.target` for requests like `srv.put('/MyService.entity')` is defined, but `req.query` undefined (before `req.target` was also undefined). This was leading to accessing undefined, which has been fixed.
- _[cds@5.9.3]_ Custom actions with names conflicting with methods from service base classes, for example, `run()`, could lead to hard-to-detect errors. This is now detected and avoided with a warning.
- _[cds@5.9.3]_ Typed methods for custom actions were erroneously applied to `cds.db` service, which led to server crashes, for example, when the action was named `deploy()`.
- _[cds@5.9.3]_ Invalid batch requests were further processed after error response was already sent to client, leading to an InternalServerError
- _[cds@5.9.3]_ Full support of `SELECT` queries with operator expressions (`xpr`)
- _[cds@5.9.2]_ i18n translation for errors did not work correctly in some cases
- _[cds@5.9.2]_ Normalization in custom `getRestrictions`
- _[cds@5.9.2]_ Throw exception by `INSERT` into HANA queries if number of provided rows deviates from number of affected rows returned by hdb to prevent data losses
- _[cds@5.9.2]_ Handler detection for extended services
- _[cds@5.9.2]_ Speed-up in localization handling
- _[cds@5.9.2]_ Draft: navigation via an association to many from a non-draft enabled entity to a draft-enabled entity
- _[cds@5.9.2]_ Limited support of `SELECT` queries with operator expressions (`xpr`)
- _[cds-mtx@2.5.4]_ `MT_LIB_TENANT-`-prefixed tenants used by the Java runtime are now correctly ignored by the `cds-mtx` sidecar.
- _[ux-cds-odata-language-server-extension@1.5.4]_ Unjustified error for `LocalDataProperty` in `Common.ValueList` when the property is defined in the service using a `many` clause.
- _[ux-cds-odata-language-server-extension@1.5.4]_ Unjustified error for `Action` in `UI.DataFieldForAction` if it contains the signatures (i.e. the parts in () ) .
- _[ux-cds-odata-language-server-extension@1.5.4]_ Unjustified warning for CAP CDS native annotation `@mandatory` when applied to a parameter.
- _[cds-odata-v2-adapter-proxy@1.8.16]_ Fix if elements are annotated with `@cds.api.ignore`
- _[cds-odata-v2-adapter-proxy@1.8.16]_ Abort file upload when limit is reached
- _[cds-odata-v2-adapter-proxy@1.8.15]_ Remove internal repository reference
- _[cds-odata-v2-adapter-proxy@1.8.15]_ Document that Singletons are not available in OData V2
- _[cds-odata-v2-adapter-proxy@1.8.15]_ Ignore omitted elements annotated with `@cds.api.ignore`
- _[cds-odata-v2-adapter-proxy@1.8.15]_ Support validated for absolute context urls via `cds.odata.contextAbsoluteUrl`.
- _[cds-odata-v2-adapter-proxy@1.8.15]_ Skip aggregation for measures with aggregation `#NONE` and `#NOP`
- _[cds-odata-v2-adapter-proxy@1.8.15]_ Support `$count` aggregations for measures with aggregation `#$COUNT`
- _[cds-odata-v2-adapter-proxy@1.8.15]_ Changed OData type mapping for `Edm.Byte` to `cds.Integer`
- _[cds-odata-v2-adapter-proxy@1.8.14]_ Upgrade `@sap/logging` to fix vulnerability
- _[cds-odata-v2-adapter-proxy@1.8.13]_ Remove peer dependency to prevent workspace failures
- _[cds-odata-v2-adapter-proxy@1.8.12]_ Refactorings to support universal CSN
- _[cds-odata-v2-adapter-proxy@1.8.12]_ Refactorings to support metadata prototype layering
- _[cds-odata-v2-adapter-proxy@1.8.12]_ Include `search` in `$apply` aggregations

## March 2022

### Added {#mar-22-added}

- _[cds-dk@4.9.0]_ `cds parse` as convenient shortcut to `cds compile --flavor parsed`.
- _[cds-dk@4.9.0]_ `cds compile --to openapi` uses value of annotation `@Common.Label` on entities, actions, and functions for operation tags, diagram includes non-primitive action and function import parameters.
- _[cds-dk@4.9.0]_ `cds add` now accepts `--for <profile>` argument to create Node,js project configuration for a given profile
- _[cds-dk@4.9.0]_ `cds add approuter` allows for serving your application's UI using SAP App Router.
- _[cds-dk@4.9.0]_ `cds add kibana-logging` adds Kibana-friendly logging in a more convenient way than having to manually alter the package.json.
- _[eslint-plugin-cds@2.3.3]_ Added new rule `no-dollar-prefixed-names`
- _[eslint-plugin-cds@2.3.3]_ Lint reports with rules marked with '!' notify of rule compile errors
- _[eslint-plugin-cds@2.3.3]_ Lint reports of any thrown errors can be exposed by `--debug` (includes stack)
- _[vscode-cds@4.5.2]_ New code-formatting options for `action`s and `function`s:
  - `alignActionNames` (aligns names)
  - `alignActionReturns` (aligns `returns` keywords)
- _[cds-compiler@2.13.0]_ CDL syntax:
  - Allow to `extend E:elem` and `annotate E:elem` instead of having to write deeply nested statements.
  - Enable `default` values as part of scalar type definitions.
  - The following `extend` syntax variants are now possible:

    ```cds
    extend … with elements { … }
    extend … with definitions { … }
    extend … with columns { … }
    extend … with enum { … }
    extend … with actions { … }
    ```

    This syntax expresses _how_ an artifact is extended instead of _what_ is extended.
  - Using `ORDER BY` in generic functions such as SAP HANA's `first_value` is now possible.
- _[cds-compiler@2.13.0]_ Make API function `compileSources` accept CSN objects as file content
- _[cds-compiler@2.13.0]_ to.edm(x): Annotate view parameters with `@sap.parameter: mandatory` (V2) and `@Common.FieldControl: #Mandatory` (V4).
- _[cds-compiler@2.13.0]_ to.sql/hdi/hdbcds: Introduce the annotations `@sql.prepend` and `@sql.append` that allow inserting user-written SQL
  snippets into the compiler generated content. Changes in annotations `@sql.prepend` and `@sql.append` are now reflected
  in the output of `to.hdi.migration`. This enables CDS Build to produce `.hdbmigrationtable` files translating such model
  changes into schema changes.
- _[cds-compiler@2.13.0]_ API: Lists of keywords for various backends are available as `to.<backend>[.<config>].keywords`, for example, `to.sql.sqlite.keywords`.
- _[cds-compiler@2.13.0]_ for.odata/to.edm(x): The draft composition hull is now also taking into account compositions in subelements.
- _[cds.java@1.23.0]_ `@Core.ContentID` is now present on OData V4 error responses, allowing to correspond OData ChangeSet error messages with the request causing the error.
- _[cds.java@1.23.0]_ Improved the `AuthenticationInfo` API to grant easier access to raw authentication information such as JWT tokens.
- _[cds.java@1.23.0]_ The `AuthenticationInfo` can now be accessed from the `RequestContext` and `EventContext` and is provided as a Spring bean. It is also propagated to child threads when propagating the `RequestContext`.
- _[cds.java@1.23.0]_ Introduced new pseudo-role `internal-user` which allows authorization for clients that share the same authentication secret as the server (for example, same XSUAA instance).
- _[cds.java@1.23.0]_ Added default set of mock users reflecting the pseudo roles. They are named `authenticated`, `system`, `internal` and `privileged` and can be used with an empty password.
- _[cds.java@1.23.0]_ Added integration with Cloud SDK's `RequestHeaderFacade` ensuring HTTP headers are propagated to Cloud SDK.
- _[cds.java@1.23.0]_ The goal `install-cdsdk` of the `cds-maven-plugin` provides the new parameter `arguments` to pass additional arguments to the command line.
- _[cds.java@1.23.0]_ Added properties `cds.auditlog.outbox` and `cds.messaging.<service>.outbox` that control the usage of the (persistent) Outbox in Auditlog resp. Messaging services.
- _[cds.java@1.23.0]_ Added mTLS (x509 certificates) authentication support for XSUAA-based platform services: Service Manager, Enterprise Messaging, SaaS Provisioning and Auditlog.
- _[cds.java@1.23.0]_ When using SAP HANA Cloud you can now enable a shared connection pool using property `cds.multiTenancy.dataSource.combinePools.enabled` without having to specify all database instances using property `cds.multiTenancy.dataSource.hanaDatabaseIds`.
- _[cds.java@1.23.0]_ `@Core.ContentID` is now present on OData V4 error responses, allowing to correspond OData ChangeSet error messages with the request causing the error.
- _[cds.java@1.23.0]_ Improved the `AuthenticationInfo` API to grant easier access to raw authentication information such as JWT tokens.
- _[cds.java@1.23.0]_ The `AuthenticationInfo` can now be accessed from the `RequestContext` and `EventContext` and is provided as a Spring bean. It is also propagated to child threads when propagating the `RequestContext`.
- _[cds.java@1.23.0]_ Introduced new pseudo-role `internal-user` which allows authorization for clients that share the same authentication secret as the server (e.g. same XSUAA instance).
- _[cds.java@1.23.0]_ Added default set of mock users reflecting the pseudo roles. They are named `authenticated`, `system`, `internal` and `privileged` and can be used with an empty password.
- _[cds.java@1.23.0]_ Added integration with Cloud SDK's `RequestHeaderFacade` ensuring HTTP headers are propagated to Cloud SDK.
- _[cds.java@1.23.0]_ The goal `install-cdsdk` of the `cds-maven-plugin` provides the new parameter `arguments` to pass additional arguments to the command line.
- _[cds.java@1.23.0]_ Added properties `cds.auditlog.outbox` and `cds.messaging.<service>.outbox` that control the usage of the (persistent) Outbox in Auditlog resp. Messaging services.
- _[cds.java@1.23.0]_ Added mTLS (x509 certificates) authentication support for XSUAA-based platform services: Service Manager, Enterprise Messaging, SaaS Provisioning and Auditlog.
- _[cds.java@1.23.0]_ When using SAP HANA Cloud you can now enable a shared connection pool using property `cds.multiTenancy.dataSource.combinePools.enabled` without having to specify all database instances using property `cds.multiTenancy.dataSource.hanaDatabaseIds`.
- _[cds4j@1.27.0]_ Allow to explicitly turn off draft-enabled associations
- _[cds4j@1.27.0]_ Support on condition resolution with Effective CSN
- _[cds4j@1.27.0]_ Collectors to connect a stream of predicates with AND or OR
- _[cds4j@1.27.0]_ Support new values for managed data (`@cds.on.insert` and `@cds.on.update`)
  - _[cds4j@1.27.0]_ `$user.locale` and `$user.tenant` to set data from the user info
  - _[cds4j@1.27.0]_ `$uuid` to automatically generate UUID values
- _[cds@5.9.0]_ Enable custom audit logging implementation by subclassing or prepending `cds.AuditLogService`
- _[cds@5.9.0]_ Log authentication/authorization traces, for example, authentication strategy, and access control decisions to facilitate troubleshooting in debug mode.
- _[cds@5.9.0]_ Bound functions and actions calls with odata-v2 from remote service
- _[cds@5.9.0]_ Beta support for procedure calls with table output data (SAP HANA only)
  - 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.
  - All parameters must be named or unnamed, that is `CALL EXAMPLE_PROC(PARAM_1 => ?,PARAM_2 => ?)` or `CALL EXAMPLE_PROC(?,?)`
- _[cds@5.9.0]_ Alpha `cds.ApplicationService.getRestrictions(definition, event, user)`, which returns the applicable restrictions for the current request as follows:
  - `null`: unrestricted access
  - `[]`: no applicable restrictions -> no access
  - `[{ grant: '...', to: ['...'], where: '...' }, ...]`: applicable restrictions with grant normalized to strings
    - That is, `grant: ['CREATE', 'UPDATE']` in model becomes `[{ grant: 'CREATE' }, { grant: 'UPDATE' }]`
  - Promise resolving to any of the above (needed for CAS override)
- _[cds@5.9.0]_ Internal model provider service can be used for obtaining dynamic csn, including features and key user extensions
- _[cds@5.9.0]_ Support insert of SQL snippets for HANA migration tables using @sql.append and @sql.prepend annotations.
- _[cds@5.9.0]_ Support for the `@odata.draft.enclosed` annotation on associations targeted via navigation — previously only supported for `$expand`
- _[cds@5.9.0]_ Pseudo role `internal-user` for technical user tokens acquired from own XSUAA instance
- _[cds@5.9.0]_ Include globally-installed cds-dk version in output of `cds version`.
- _[cds@5.9.0]_ Include version of cds-mtx in output of `cds version`, if available.
- _[cds@5.9.0]_ Feature toggle support in `cds build` for cloud deployments. Create language bundles and parsed CSN for all features.
- _[cds@5.9.0]_ Support for `@Aggregation.default` in new OData parser (`cds.env.features.odata_new_parser = true`)

### Changed {#mar-22-changed}

- _[cds-dk@4.9.0]_ `cds init` does not create `VS Code` file exclusions anymore, so that `.vscode/` and `.gitignore` are visible by default, allowing easier editing of these files.
- _[cds-dk@4.9.0]_ `cds init` reports Maven archetype version in console if called with `--add java`.
- _[cds-dk@4.9.0]_ `cds init` uses latest Maven Java archetype version 1.22.2 for creating Java projects.
- _[cds-dk@4.9.0]_ `cds import` modified documentation for namespace option.
- _[cds-dk@4.9.0]_ `cds import` does not create bound function imports key parameters in CSN for OData V2.
- _[cds-dk@4.9.0]_ `cds import` now when `--keep-namespace` option is not given validates the file name and then converts it to complier supported format as service name .
- _[cds-dk@4.9.0]_ add new methods from `FsUtil` to typescript interface.
- _[cds-dk@4.8.2]_ `cds init` uses latest Maven Java archetype version 1.22.1 for creating Java projects.
- _[eslint-plugin-cds@2.3.4]_ Only deduplicate model error messages when working within VS Code Editor
- _[eslint-plugin-cds@2.3.4]_ Hide `no-dollar-prefixed-names` compiler warning message in VS Code Editor (already passed by lsp)
- _[vscode-cds@4.5.3]_ Consume `package.json` and `.cdsrc.json` schemas from `@sap/cds-lsp`
- _[vscode-cds@4.5.3]_ Better error message in case `cds preview` could not compile a source file
- _[vscode-cds@4.5.2]_ Removed obsolete code-formatting option `alignAsInElements` (calculated fields use `=` now)
- _[cds-compiler@2.13.0]_ In query entities inside services, only auto-redirect associations and compositions
  in the main query of the entity.
- _[cds-compiler@2.13.0]_ An element now inherits the property `notNull` from its query source (as
  before) or its type (like it does for most other properties);
  `notNull` is then not further propagated to its sub elements anymore.
- _[cds-compiler@2.13.0]_ A structure element inherits the property `virtual` from its query source (as
  before), but does not further propagate `virtual` to its sub elements
  (semantically of course, but the CSN is not cluttered with it);
  there is a new warning if a previously `virtual` query entity
  element is now considered to be non-virtual.
- _[cds-compiler@2.13.0]_ Do not propagate annotation value `null`.
  The value `null` of an annotation (and `doc`) is used to stop the inheritance
  of an annotation value.  This means than other than that, a value `null` should
  not be handled differently to not having set that annotation.
- _[cds-compiler@2.13.0]_ In the effective CSN, the structure type is only expanded if something has changed
  for associations: the `target` (`keys` does not change if the `target` does not change)
  unmanaged associations as sub elements are not supported anyway.
- _[cds-compiler@2.13.0]_ In the effective CSN, “simple” type properties like `length`, `precision`,
  `scale` and `srid` are propagated even for a propagation via type.
- _[cds-compiler@2.13.0]_ Update OData Vocabularies: 'Capabilities', 'Common', 'Core', 'UI'.
- _[cds-compiler@2.13.0]_ to.sql:
  - For SQL dialect `hana` referential constraints are now appended
    as `ALTER TABLE ADD CONSTRAINT` clause to the end of `schema.sql`.
    With option `constraintsInCreateTable` constraints are rendered into the
    `CREATE TABLE` statement.
  - Referential constraint names are now prefixed with `c__`.
- _[cds.java@1.23.0]_ Removed `RequestContextRunner.recalculateFeatureToggles()` without substitution. `RequestContextRunner.featureToggles(FeatureTogglesInfo)` is only allowed when creating the initial `RequestContext` of a request. The method throws an exception otherwise.
- _[cds.java@1.23.0]_ Removed `RequestContextRunner.recalculateFeatureToggles()` without substitution. `RequestContextRunner.featureToggles(FeatureTogglesInfo)` is only allowed when creating the initial `RequestContext` of a request. The method throws an exception otherwise.
- _[cds4j@1.27.0]_ If the data of deep Insert or deep Update contains values of an associated entity but the (forward mapped) association does not cascade the Insert/Update operation, the relationship is established instead of throwing an exception
- _[cds@5.9.0]_ Cleaned up `cds.env.requires` towards a consistent usage:
  - 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 for example, `cds.requires.sql` will still return a match.
  - Added support for db-specific  `cds.requires.db.deploy-format` → deprecating `cds.hana.deploy-format` (which is still supported for compatibility)
  - Introduced `cds.requires.kinds.hana-cloud` as `{kind:hana, deploy-format:hdbtable}` → to be used by default for production
  - 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.
  - 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.
- _[cds@5.9.0]_ Update-managed properties (`@cds.on.update`) are always updated
  - Example: `UPDATE('Books').set({}).where({ ID: 1 })` leads to new modifiedAt and modifiedBy
  - Does not apply to nested entities that are only preserved by specifying their primary keys in the data
  - Deactivate during two month grace period via compact feature flag `cds.env.features.update_managed_properties = false`
- _[cds@5.9.0]_ Response no longer contains keys neither technical draft properties (for example, `HasDraftEntity` or `InProcessByUser`) in expanded data if they were not requested explicitly when using `cds.Service` API
  - Example:

    ```js
    > await srv.read('Authors', a => { a.name, a.books(b => { b.title }) }).where({ ID: 1 })
    // -> "old behaviour" result
    [{ name: 'Emily Brontë', books: [{ title: 'Wuthering Heights', ID: 201 }] }]
    // -> "new behaviour" result
    [{ name: 'Emily Brontë', books: [{ title: 'Wuthering Heights' }] }]
    ```

  - Technical draft properties are not automatically fetched also on a root level
  - Deactivate during two month grace period via compat feature flag `cds.env.features.auto_fetch_expand_keys = true`
- _[cds@5.9.0]_ Access control is checked in generic handlers (rather than handlers materialized on app startup)
- _[cds@5.9.0]_ Expand restriction check moved to pre-before phase
- _[cds@5.9.0]_ 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.
- _[cds@5.9.0]_ Authentication middleware is always mounted (used to be only for restricted services)
- _[cds@5.9.0]_ Fiori preview now uses the Horizon theme
- _[cds@5.9.0]_ '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.
- _[cds@5.9.0]_ Don't throw error in GraphQL adapter if update mutation filter does not match any entries (to be consistent with delete mutations)
- _[cds@5.9.0]_ Remote call of unbound action/function returns octet-stream instead of string by default
- _[cds@5.9.0]_ Default pool's behavior has been changed from `FIFO` (queue) to `LIFO` (stack). Can be changed in pool configuration.
- _[cds@5.9.0]_ `cds run/serve` now gracefully shuts down the HTTP server before exiting.  Custom handlers for signals like `SIGTERM` or `SIGINT` can now be processed.
- _[cds@5.9.0]_ `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.

### Fixed {#mar-22-fixed}

- _[cds-dk@4.9.0]_ `cds compile --to openapi` now correctly treats `null` and the empty string as function parameters.
- _[cds-dk@4.9.0]_ `cds bind --exec` no command output (STDOUT) displayed on Windows.
- _[cds-dk@4.9.0]_ `cds watch` now gracefully shuts down the live reload server before exiting
- _[cds-dk@4.9.0]_ `cds import` now generates correct csn for both OData V2 and V4 EDMX files where the EntityType has a BaseType entry.
- _[cds-dk@4.9.0]_ `cds import` now throws an error in case of missing Association Sets.
- _[cds-dk@4.9.0]_ `cds import` bug fixed for `--force` flag. Now overwrites the correct file content.
- _[cds-dk@4.9.0]_ `cds import` fix will no longer capture unwanted annotations in the CSN for OData V4.
- _[cds-dk@4.9.0]_ `cds import` now support annotations for properties of type `Type Definition`
- _[cds-dk@4.9.0]_ `cds import` fix for supporting valid datatypes in unbounded function imports for OData V4.
- _[cds-dk@4.9.0]_ `cds import` bug fixed for missing data imports for parameters with entity type not mapped to an entity set.
- _[cds-dk@4.9.0]_ `cds import` now supports properties with complex type for OData V4.
- _[cds-dk@4.9.0]_ `cds import` fix will now throw error if the key property of an entity is of type `Collection` for both OData V2 and V4 edmx.
- _[cds-dk@4.9.0]_ `cds bind --to hana` provides more comprehensive error message in case Cloud Foundry `org` or `space` are not set.
- _[cds-dk@4.8.2]_ `cds import` can now capture the data for any given `EntityContainer Name` for OData V4. Earlier it only worked when the name was `EntityContainer`.
- _[vscode-cds@4.5.3]_ No loner set NODE_ENV to production which resulted in `npm i` only installing prod dependencies
- _[vscode-cds@4.5.2]_ Saving a `cds` file now automatically refreshes all open previews for this file
- _[vscode-cds@4.5.2]_ _Show Formatting Options Configuration_
  - Showed empty samples editor
  - Editor no longer switches to typescript
  - No longer _save changes_ popup when closing samples editor
  - When not opened on existing file (CDS source or .cdsprettier.json) and workspace
    has multiple workspace folders, user has now to pick the workspace folder
- _[vscode-cds@4.5.2]_ Code formatting:
  - Separate post-annotation with blank
  - Remove erroneous newlines around cardinality and filter in `select`
  - Separate projection items with newlines
- _[vscode-cds@4.5.2]_ Code completion for annotations now correctly handle e.g: @aaa.| entity
- _[cds-compiler@2.13.8]_ to.hdbcds/hdi/sql: Correctly handle `localized` in conjunction with `@cds.persistence.exists` and `@cds.persistence.skip`
- _[cds-compiler@2.13.6]_ to.hdbcds/hdi/sql: Correctly handle `localized` in conjunction with `@cds.persistence.exists`
- _[cds-compiler@2.13.0]_ Properly resolve references inside anonymous aspects:
  - references starting with `$self.` made the compiler dump.
  - a simple `$self` did  not always work as expected (it represents the entity created via the anonymous aspect).
  - other references inside deeply nested anonymous aspects induced a compilation error.
- _[cds-compiler@2.13.0]_ compiler: `()` inside `ORDER BY` clause was not correctly set.
- _[cds-compiler@2.13.0]_ parse.cdl: References in `ORDER BY` and filters are now correctly resolved.
- _[cds-compiler@2.13.0]_ Issue error when trying to introduce managed compositions of aspects in `mixin`s
- _[cds-compiler@2.13.0]_ Issue error in all cases for type references to unmanaged associations.
- _[cds-compiler@2.13.0]_ Avoid dump when extending an illegal definition with a name starting with `cds.`.
- _[cds-compiler@2.13.0]_ to.sql/to.cdl/to.hdbcds/to.hdi: Render `cast()` inside `ORDER BY`, `GROUP BY` and `HAVING` properly.
- _[cds-compiler@2.13.0]_ to.sql/hdi/hdbcds:
  - `$self` was incorrectly treated as a structured path step.
  - Correctly handle table alias in on-condition of mixin in `exists` expansion.
  - Correctly handle table `$self` references to aliased fields in on-condition of mixin association
    during `exists` expansion.
- _[cds-compiler@2.13.0]_ to.edm: Don't escape `&` as `&amp;`.
- _[cds-compiler@2.13.0]_ to.edmx: Escaping compliant to XML specification:
  - `&` and `<` are always escaped.
  - `>` is not escaped, unless it appears in text values as `]]>`.
  - `"` is escaped in attribute values only.
  - Control characters are always escaped.
- _[cds-compiler@2.13.0]_ Ellipsis (`...`) in annotations in different layers but without base annotation now produces an error.
  The old but incorrect behavior can be re-enabled with option `anno-unexpected-ellipsis-layers`.
- _[cds.java@1.23.0]_ Fixed a NPE in Auditlog v2 handler in case of single tenant scenario (ST) and OAuth2 plan.
- _[cds.java@1.22.2]_ Fixed a bug causing changes on draft entities to be incorrectly handled when performed over a to-one navigation property.
- _[cds.java@1.23.0]_ Fixed a NPE in Auditlog v2 handler in case of single tenant scenario (ST) and OAuth2 plan.
- _[cds.java@1.22.2]_ Fixed a bug causing changes on draft entities to be incorrectly handled when performed over a to-one navigation property.
- _[cds4j@1.27.0]_ Fix classloader issue with generated interfaces when using `spring-boot-devtools`
- _[cds4j@1.27.0]_ Code generator: Fix use of '$' in doc comments
- _[cds4j@1.27.0]_ Fix ClassCastException when selecting arrayed elements via static CDS QL builder
- _[cds4j@1.26.2]_ HANA Search: In case a search operates on elements that are only supported with LIKE the search falls
  back to LIKE only for those elements and not for the whole statement. This can improve the scalability of
  a search operations significantly.
- _[cds4j@1.26.2]_ HANA Search: Resolve search over elements in views with UNION to LIKE instead of CONTAINS.
- _[cds4j@1.26.2]_ HANA Search: Resolve search over elements typed with LargeString (NClob) with LIKE instead of CONTAINS.
- _[cds4j@1.26.2]_ HANA Search: Resolve search over elements in views annotated with @cds.persistence.exists: true with LIKE instead of CONTAINS.
- _[cds@5.9.1]_ Function arguments might be escaped too often
- _[cds@5.9.1]_ URL encoding for remote services for CQN queries
- _[cds@5.9.1]_ `cds serve` during development again redirects URLs for UI apps in a folder with the same name as a service, so `/foo/webapp` would redirect to `/foo` again.  This got broken in 5.8.3.
- _[cds@5.9.1]_ Endless loop in localization handling
- _[cds@5.9.1]_ Ensure service impl while extending entity from the service
- _[cds@5.9.1]_ Post-processing of custom draft queries
- _[cds@5.9.1]_ `cds build` no longer omits unused CDS type definitions, leading to Java compiler errors
- _[cds@5.9.0]_ Logging of failed requests to remote services was incompatible to Elasticsearch
- _[cds@5.9.0]_ `cds serve --project <dir>` didn't serve static web resources from `<dir>`
- _[cds@5.9.0]_ `cds serve -p <dir>` was meant to be a shortcut for `cds serve --project <dir>`
- _[cds@5.9.0]_ Messaging: Use correct kind for logging
- _[cds@5.9.0]_ Incorrect return values for update-managed properties (`@cds.on.update`) of child entities that were not changed in request
- _[cds@5.9.0]_ `$filter` with navigation to-one eq null
- _[cds@5.9.0]_ Calculation of `DraftIsProcessedByMe` when navigating to `DraftAdministrativeData`
- _[cds@5.9.0]_ Inbound streaming with media type annotated as `@Core.Computed`
- _[cds@5.9.0]_ Pass column expression into `SELECT()` (example: `SELECT('SUBSTRING(locale,0,2) as loc').from(<entity>)`)
- _[cds@5.9.0]_ Annotation `@cds.api.ignore` ignores key in new parser
- _[cds@5.9.0]_ Inconsistencies in actions and functions API
- _[cds@5.9.0]_ Opening root transaction in `srv.run` if none exists
- _[cds@5.9.0]_ Glitches in handling of `req.user.tenant` and `req.user.locale`
- _[cds@5.9.0]_ Flattened keys in URL are resolved correctly if they are unique in new REST adapter
- _[cds@5.9.0]_ Actions and functions in REST adapter
- _[cds@5.9.0]_ Empty string as key does not work in new parser
- _[cds@5.9.0]_ Requesting property of an entity caused error in new parser
- _[cds@5.9.0]_ The SQLite CSV import now imports `"true"` and `"false"` as strings instead of Booleans
- _[cds@5.9.0]_ Fixed loading mechanism for custom build task handlers
- _[cds@5.9.0]_ `req.diff()` for `UPDATE` on a view with renamed property in `orderBy`
- _[cds@5.9.0]_ `$user.<attr>` for managed properties (`@cds.on.insert`/`@cds.on.update`)
- _[cds@5.9.0]_ GraphQL `__typename` meta field if it is the only selected field of an association/composition
- _[cds@5.9.0]_ Command shortcuts like `cds c` are now handled properly if executed in an npm script
- _[cds@5.9.0]_ ETag is not included in expanded entities using `$select`, for example: `Books(1)?$expand=author($select=ID)`
- _[cds@5.9.0]_ `cds.compile.to...` no longer crashes if called with a CSN that has a dangling ref
- _[cds@5.9.0]_ Requests to remote services via navigation path without explicit `$select`, but having `$expand` query option
- _[cds@5.9.0]_ `cds.compile` correctly supports reserved namespaces like `cds.foundation`.
- _[cds@5.9.0]_ `cds.compile.to.serviceinfo` now uses the correct configuration for the base URL paths for Java services
- _[cds@5.9.0]_ `cds deploy --to sqlite` correctly localizes texts in deployed views. Before not all localized texts have been correctly resolved.
- _[cds@5.9.0]_ `cds deploy --to hana` reports missing org or space info with a better message.
- _[cds@5.9.0]_ Using combinations of `.` and `_` in CSN definition names
- _[cds@5.8.4]_ `UPDATE` singleton entity does not require to provide singleton keys in a payload
- _[cds@5.8.4]_ CQN queries with operator expressions (`xpr`) in ON-conditions of unmanaged associations and compositions
- _[cds@5.8.3]_ `queries` property for application-defined destinations of remote services
- _[cds@5.8.3]_ `cds serve --watch` no longer fails if `@sap/cds-dk` is installed only globally
- _[cds@5.8.3]_ `cds serve` during development longer redirects URLs with similar path segments from different services, like `/service/one` and `/service`
- _[cds@5.8.3]_ `cds deploy --to sqlite` now ignores a `_texts.csv` file again if there is a language-specific file like `_texts_en.csv` present
- _[cds@5.8.3]_ Using logical blocks (surrounded with `(` and `)`) in ON-conditions of unmanaged associations and compositions
- _[cds@5.8.3]_ Skip "with parameters" clause if no order by clause or all columns in the order by clause are not strings when using parametrized views on SAP HANA
- _[cds@5.8.3]_ Limited support for binary data in OData
  - _[cds@5.8.3]_ Using of `base64` encoded string values in `WHERE IN` on SAP HANA
  - _[cds@5.8.3]_ `base64url` values in `@odata.context` annotation
- _[cds@5.8.3]_ `cds.context` is set in GraphQL adapter
- _[cds@5.8.3]_ Using payloads with `@odata.type` annotating primitive properties no longer crashes the application. `#` in type value may be omitted. Example:

  ```json
  {
    "ID": 201,
    "title@odata.type": "#String",
    "title": "Wuthering Heights",
    "stock@odata.type": "Int32",
    "stock": 12
  }
  ```

- _[cds@5.8.3]_ Unicode support for i18n bundles
- _[cds-mtx@2.5.3]_ Provisioning parameters for the container creation can now also be set exclusively for the `__META__` container via cds environment `mtx.provisioning.metadatacontainer` or environment variable `CDS_MTX_PROVISIONING_METADATACONTAINER`. Tenant containers are not affected by that cds environment.
- _[cds-mtx@2.5.3]_ Configuration parameters for the `@sap/instance-manager` module can now be passes using cds environment `mtx.provisioning.instancemanageroptions` or environment variable `CDS_MTX_PROVISIONING_INSTANCEMANAGEROPTIONS`. See also [@sap/instance-manager](https://www.npmjs.com/package/@sap/instance-manager).
- _[cds-mtx@2.5.3]_ Upgrade calls for non-existing tenants do no longer create orphan HDI containers
- _[cds-mtx@2.5.3]_ More robust handling of inconsistent HDI container having no tenant id (error "TypeError: Cannot read property 'toLowerCase' of undefined")
- _[cds-odata-v2-adapter-proxy@1.8.11]_ Fix for `falsy` values during data type conversion for functions and actions
- _[cds-odata-v2-adapter-proxy@1.8.11]_ Add OData V2 links via link providers to HTML index page
- _[cds-odata-v2-adapter-proxy@1.8.10]_ Refactor locale determination from CDS
- _[cds-odata-v2-adapter-proxy@1.8.10]_ Serialize body to string in case of type `object` before calculating content length
- _[cds-odata-v2-adapter-proxy@1.8.10]_ Support `AnalyticalContext` annotations in addition to deprecated `Analytics` annotations

### Removed {#mar-22-removed}

- _[cds@5.9.0]_ Redundant locale implementation

## February 2022

### Added {#feb-22-added}

- _[cds.java@1.22.1]_ The `cds-feature-auditlog-v2` automatically provides the dependency to the AuditLog v2 services during MT subscription, if it's using an `oauth2` plan.
- _[cds.java@1.22.0]_ Added a local in-memory `MessagingService` implementation with kind `local-messaging` that can be used in JUnit tests. Its event publishing is synchronous to the event listeners, which frees test code from having to wait on the asynchronous execution of the listeners.
- _[cds.java@1.22.0]_ The multitenancy library is now configured with a default resilience config, that attempts up to three retries with a wait time of 500ms in between in case requests to the MTX sidecar fail with unexpected errors.
- _[cds.java@1.22.0]_ The OData V2 adapter now handles `@Aggregation.default: #COUNT`.
- _[cds.java@1.22.0]_ The audit logging implementation now handles `@PersonalData.EntitySemantics: 'Other'`.
- _[cds.java@1.22.0]_ `IN` predicates with user attributes are now supported in instance-based authorization conditions, e.g. `country in $user.countries`.
- _[cds.java@1.22.0]_ To support deferred foreign key constraints in SQLite during the CSV data import, all CSV files can be imported in a single changeset. This behavior can be enabled by setting the new property `cds.dataSource.csvSingleChangeset` to `true`.
- _[cds.java@1.22.0]_ Added a local in-memory `MessagingService` implementation with kind `local-messaging` that can be used in JUnit tests. Its event publishing is synchronous to the event listeners, which frees test code from having to wait on the asynchronous execution of the listeners.
- _[cds.java@1.22.0]_ The multitenancy library is now configured with a default resilience config, that attempts up to three retries with a wait time of 500ms in between in case requests to the MTX sidecar fail with unexpected errors.
- _[cds.java@1.22.0]_ The OData V2 adapter now handles `@Aggregation.default: #COUNT`.
- _[cds.java@1.22.0]_ The audit logging implementation now handles `@PersonalData.EntitySemantics: 'Other'`.
- _[cds.java@1.22.0]_ `IN` predicates with user attributes are now supported in instance-based authorization conditions, e.g. `country in $user.countries`.
- _[cds.java@1.22.0]_ To support deferred foreign key constraints in SQLite during the CSV data import, all CSV files can be imported in a single changeset. This behavior can be enabled by setting the new property `cds.dataSource.csvSingleChangeset` to `true`.

### Changed {#feb-22-changed}

- _[cds-dk@4.8.1]_ `cds init` uses latest Maven Java archetype version `1.22.0` for creating Java projects.
- _[cds.java@1.22.0]_ Potentially sensitive values are now excluded from logged CQN statements by default. To enable logging of sensitive values again you can set `cds.security.logPotentiallySensitive` to `true`
- _[cds.java@1.22.0]_ Potentially sensitive values are now excluded from logged CQN statements by default. To enable logging of sensitive values again you can set `cds.security.logPotentiallySensitive` to `true`

### Fixed {#feb-22-fixed}

- _[cds-dk@4.8.1]_ Bump `follow-redirects` package to 1.14.8 (CVE-2022-0536)
- _[cds-dk@4.8.1]_ `cds bind --exec` no command output (STDOUT) displayed on Windows.
- _[vscode-cds@4.5.1]_ extension did not start in Business Application Studio
- _[cds.java@1.22.1]_ The `cds-feature-auditlog-v2` doesn't support plan `oauth2` in combination with persistent Outbox and the startup of the CAP Java application now fails with a corresponding error. If persistent Outbox is enabled, the plan `standard` of the Auditlog v2 service has to be used.
- _[cds.java@1.22.0]_ Fixed a bug, that caused `NullPointerException`s when elements were present in a `Result` provided to the OData V2 adapter that were not part of the EDMX definition.
- _[cds.java@1.22.1]_ The `cds-feature-auditlog-v2` doesn't support plan `oauth2` in combination with persistent Outbox and the startup of the CAP Java application now fails with a corresponding error. If persistent Outbox is enabled, the plan `standard` of the Auditlog v2 service has to be used.
- _[cds.java@1.22.0]_ Fixed a bug, that caused `NullPointerException`s when elements were present in a `Result` provided to the OData V2 adapter that were not part of the EDMX definition.
- _[cds4j@1.26.1]_ Navigating associations of draft-enabled entities with keys named other than 'ID'.
- _[cds4j@1.26.1]_ Fix potential hash collisions in deep updates
- _[cds4j@1.26.1]_ Elements with type UUID that are annotated with `@odata.Type:'Edm.String'` are not normalized anymore, comparison is case sensitive
- _[cds@5.8.2]_ Crash if error does not have a stack in Kibana logging
- _[cds@5.8.2]_ Allow short names for bound operations in odata-server
- _[cds@5.8.2]_ Performance issue during deep operations
- _[cds@5.8.2]_ Resolving views with parameters
- _[cds@5.8.2]_ Expanding association-to-many within draft union scenario
- _[cds@5.8.2]_ Erroneous invalidation of deep `INSERT|UPDATE|DELETE` operations if root entity has managed to-one association to non-writable view
- _[cds@5.8.2]_ Handling of falsy results when sending requests to remote services
- _[cds@5.8.2]_ Resolving foreign key propagations for views with union
- _[cds@5.8.1]_ Use single transaction for update mutations in GraphQL adapter
- _[cds@5.8.1]_ ODATA to CQN parser returned not selected keys in `@odata.context`
- _[cds@5.8.1]_ Draft: `$expand` with special draft columns in `$orderBy` for active entities
- _[cds@5.8.1]_ Reading distinct values of draft enabled entity
- _[cds@5.8.1]_ Handling of LOB data on HANA
- _[cds@5.8.1]_ Fix streaming draft by navigation
- _[cds@5.8.1]_ Empty to-many arrays are not removed from req.data for inserts
- _[cds@5.8.1]_ `$filter` query option in structured mode (OData flavors `w4` and `x4`)
  - Using JSON-stringified objects no longer occasionally crashes an application
  - Filtering on a structured element with `ne null` condition also selects data having some `null` properties within
- _[cds@5.8.1]_ Rest: `Content-type` header is set to `text/plain` for primitive data types in response (except for `Boolean`)
- _[cds@5.7.6]_ `draftActivate` action does not return children if not requested
- _[cds-odata-v2-adapter-proxy@1.8.9]_ Stabilization fixes
- _[cds-odata-v2-adapter-proxy@1.8.8]_ Proxy option `calcContentDisposition` to calculate `content-disposition` header even if already available
- _[cds-odata-v2-adapter-proxy@1.8.7]_ Proxy option `fixDraftRequests` to convert unsupported draft request to a working version (default: false)
- _[cds-odata-v2-adapter-proxy@1.8.6]_ Fix README for combined custom backend bootstrap
- _[cds-odata-v2-adapter-proxy@1.8.6]_ Allow annotation `@odata.type` in lower case format
- _[cds-odata-v2-adapter-proxy@1.8.6]_ Allow type prefix `datetime` in addition to `datetimeoffset`
- _[cds-odata-v2-adapter-proxy@1.8.6]_ Add peer dependency @types/express

## January 2022

### Added {#jan-22-added}

- _[cds-dk@4.8.0]_ `cds import` now reflects the entity set and entity container level annotations in the csn.
- _[cds-dk@4.8.0]_ `cds activate --sync` allows to use the synchronous server API for extension upload.
- _[vscode-cds@4.5.0]_ workspace symbols query now supports filters for kinds
- _[cds-compiler@2.12.0]_ CDL parser: You can now use multiline string literals and text blocks.
  Use backticks (\`) for string literals that can span multiple lines and can use JavaScript-like escape
  sequences such as `\u{0020}`.  You can also use three backticks (\`\`\`) for strings (a.k.a. text blocks)
  which are automatically indentation-stripped and can have an optional language identifier that is used
  for syntax highlighting, similar to markdown.  In difference to the former, text blocks require the
  opening and closing backticks to be on separate lines.
  Example:

  ```cds
  @annotation: `Multi
   line\u{0020}strings`
  @textblock: ```xml
              <summary>
                <detail>The root tag has no indentation in this example</detail>
              </summary>
              ```
  ```

- _[cds-compiler@2.12.0]_ Enhance the ellipsis operator `...` for array annotations by an `up to <val>`:
  only values in the array of the base annotation up to (including) the first match
  of the specified `<val>` are included at the specified place in the final array value.
  An array annotation can have more than on `... up to <val>` items and must also
  have a pure `...` item after them.
  A structured `<val>` matches if the array item is also a structure and all property
  values in `<val>` are equal to the corresponding property value in the array value;
  it is not necessary to specify all properties of the array value items in `<val>`.
  Example

  ```cds
  @Anno: [{name: one, val: 1}, {name: two, val: 2}, {name: four, val: 4}]
  type T: Integer;
  @Anno: [{name: zero, val: 0}, ... up to {name: two}, {name: three, val: 3}, ...]
  annotate T;
  ```

- _[cds-compiler@2.12.0]_ for.odata: Support `@cds.on {update|insert}` as replacement for deprecated `@odata.on { update|insert }` to
  set `@Core.Computed`.
- _[cds4j@1.26.0]_ Support nulls first|last in orderBy
- _[cds4j@1.26.0]_ JavaDocs for CqnVisitor
- _[cds@5.8.0]_ Custom `server.js` don't have to export `cds.server` anymore -> we use that by default now.
- _[cds@5.8.0]_ In `cds.requires`: Support to replace primitive values with objects
- _[cds@5.8.0]_ Support filter functions on renamed properties from external service
- _[cds@5.8.0]_ Results of database queries use `big.js` for values of type `cds.Decimal` and `cds.Integer64` if enabled via `cds.env.features.bigjs`
- _[cds@5.8.0]_ Support lambda in `$filter` in `$expand`
- _[cds@5.8.0]_ Support for `GET` requests on service root in REST adapter (old and new)
- _[cds@5.8.0]_ Support for `HEAD` requests in REST adapter (old and new)
- _[cds@5.8.0]_ New hook `req.before('commit')`
- _[cds@5.8.0]_ Draft (Access control for bound actions): Only the user that is the owner of the draft can execute its bound actions.
- _[cds@5.8.0]_ Check that all keys are provided in REST adapter
- _[cds@5.8.0]_ Restrict access to all services via `cds.env.requires.auth.restrict_all_services = true`
  - That is, all unrestricted services (i.e., w/o own `@requires`) are treated as having `@requires: 'authenticated-user'`
- _[cds@5.8.0]_ Threshold for automatically sending GET requests as `$batch` (beta, cf. @sap/cds@5.6.0) can be configured per remote service via `cds.env.requires.<srv>.max_get_url_length` (if not configured on service, the global config applies)
- _[cds@5.8.0]_ Limited support for binary data in OData
  - In payloads, the binary data must be a base64 encoded string
  - In URLs, the binary data must have the following format: `binary'<url-safe base64 encoded>'`, for example, `$filter=ID eq binary'Q0FQIE5vZGUuanM='`
  - The use of binary data in some advanced constructs like `$apply` and `/any()` may be limited
  - On SQLite, the base64 encoded string is stored in the database
  - It's strongly discouraged to use binary data as keys. See "Primary Keys — Best Practices" in the documentation.
- _[cds@5.8.0]_ Support for OData annotation `@Core.ContentDisposition.Type` with `attachment` as the default value
- _[cds@5.8.0]_ Support for returning custom stream objects in custom handlers <Beta />:
  - Example:

    ```js
    return {
      value: instanceof Readable || null,
      $mediaContentType : 'image/jpeg',
      $mediaContentDispositionFilename : 'foo.bar', // > optional
      $mediaContentDispositionType : 'inline' // > optional
    }
    ```

- _[cds-mtx@2.5.2]_ It is now checked if CDS annotations `@sql.append` and `@sql.prepend` are used in extensions. Using these annotations in extensions is currently not allowed.

### Changed {#jan-22-changed}

- _[cds-dk@4.8.0]_ The forked package `@mendix/sqlite3` is now used instead of `sqlite3` to overcome CVE-2021-32804.  No code changes in applications are needed, as the new package installed by `npm` with the same name `sqlite3`.
- _[cds-dk@4.8.0]_ [beta] The templating for `cds init` and `cds add` has been rewritten from scratch. This will allow for some new, more complex commands, such as `cds add mtx` or `cds add xsuaa`.
- _[cds-dk@4.8.0]_ Use `cds bind` during `cds deploy` to store connection information in file `.cdsrc-private.json`.
- _[cds-dk@4.7.3]_ Bump `follow-redirects` package to 1.14.7 (CVE-2022-0155)
- _[eslint-plugin-cds@2.3.2]_ Rule `require-2many-oncond` now also detect navigations of aspects for flavor 'parsed'
- _[eslint-plugin-cds@2.3.2]_ Removed duplicates from rule results of category 'Environment'
- _[vscode-cds@4.5.0]_ consume cds-compiler 2.12.0
- _[vscode-cds@4.5.0]_ code completion for `index.cds` files will now render just the folder
- _[vscode-cds@4.5.0]_ CDS language server is now bundled and minified to speed up initialization
- _[vscode-cds@4.5.0]_ performance: revalidate file on focus got only if stale index
- _[vscode-cds@4.5.0]_ memory consumption: indexes are now cached per file, no longer per compilation
- _[cds-compiler@2.12.0]_ Update OData Vocabularies 'Aggregation', 'Capabilities', 'Common', 'Core', PersonalData, 'Session', 'UI'
- _[cds4j@1.26.0]_ CqnStructuredTypeRef does not traverse the segments any longer
- _[cds4j@1.26.0]_ visiting ref segments is deprecated:
  - CqnReference.Segment.accept(CqnVisitor)
  - CqnVisitor.visit(Segment) are deprecated
- _[cds@5.8.0]_ `cds deploy --to hana` now uses `cf curl` instead of `cf` command natively
- _[cds@5.8.0]_ Event Mesh: In multitenancy mode, messaging artifacts are also deployed for provider accounts (unless the service option `deployForProvider` is set to `false`)
- _[cds@5.8.0]_ Status code in case of multiple errors (rules apply in order):
  - If all errors have the same status code, that status code is used
  - If there is at least one 5xx status code, the resulting status code is 500
  - If there is at least one 4xx status code, the resulting status code is 400
  - If none of the rules apply, the resulting status code is 500
- _[cds@5.8.0]_ Ignore the `If-Match` HTTP request header for `UPDATE`/`DELETE` requests whose target entities are not annotated with the `@odata.etag` annotation.
- _[cds@5.8.0]_ I18n template strings now are replaced in EDMX documents such that they can occur multiple times.  For example, the `{i18n>key1} - {i18n>key2}` template results in `value1 - value2`, while previously only the first string was replaced, leading to `value1 - {i18n>key2}`.  This is helpful for the [`Template` strings of `UI.ConnectedFields`](https://github.com/SAP/odata-vocabularies/blob/ac9fe832df9b8c8d35517c637dba7c0ac2753b0f/vocabularies/UI.xml#L168).

### Fixed {#jan-22-fixed}

- _[cds-dk@4.8.0]_ `cds import` now omits function imports with `put/delete` kind.
- _[cds-dk@4.8.0]_ `cds import` has fixed the entity type to entity set mapping in OData V2.
- _[cds-dk@4.8.0]_ `cds import` now supports collection type.
- _[cds-dk@4.8.0]_ `cds watch` now picks a free livereload port if the standard port 35729 is already bound
- _[cds-dk@4.8.0]_ `cds extend`, `cds activate`, `cds login`, and `cds logout` now prioritize command-line options over saved settings
- _[cds-dk@4.8.0]_ MTX client now logs fewer characters of secrets in debug output
- _[cds-dk@4.8.0]_ MTX client now handles incomplete error responses better
- _[vscode-cds@4.5.0]_ `cds preview` is now refreshing the preview correctly when called after the underlying cds file has been changed
- _[vscode-cds@4.5.0]_ `enum` was not indexed
- _[vscode-cds@4.5.0]_ `composition` of aspect was not indexed
- _[vscode-cds@4.5.0]_ symbols contained localized entries with recent compiler versions
- _[vscode-cds@4.5.0]_ workspaces with _many_ workspace folders could lead to stop lsp
- _[vscode-cds@4.5.0]_ syntax highlighting is now better aligned with CDS grammar:
  - multi-lined strings disabled
  - backslash escaping disabled
  - doubled quotes inside strings to reproduce single quotes
  - element types now include scopes and length/size arguments
- _[cds-compiler@2.12.0]_ to.sql/hdi/hdbcds: With `exists`, ensure that the precedence of the existing association-on-conditions and where-conditions is kept by adding braces.
- _[cds-compiler@2.12.0]_ to.sql/hdi: Window function suffixes are now properly rendered.
- _[cds-compiler@2.12.0]_ to.sql: `$self` comparisons inside aspects are not checked and won't result in an error anymore.
- _[cds-compiler@2.12.0]_ to.hdbcds:
  - Correctly apply the "."-to-"_"-translation algorithm to artifacts that are marked with `@cds.persistence.exists`.
  - Message with ID `anno-hidden-exists` (former `anno-unstable-hdbcds`) is now
    only issued if the compiler generates a SAP HANA CDS artifact which would hide
    a native database object from being resolved in a SAP HANA CDS `using … as …`.
- _[cds-compiler@2.12.0]_ to.cdl: Annotation paths containing special characters such as spaces or `@` are now quoted, e.g. `@![some@annotation]`.
- _[cds-compiler@2.12.0]_ compiler: A warning is emitted for elements of views with localized keys as the localized property is ignored for them.
- _[cds4j@1.26.0]_ Fix to-many expands using `or` in on condition
- _[cds4j@1.26.0]_ Code generator: Allow expand and to select subelements of structured elements in builder interfaces
- _[cds4j@1.26.0]_ Fix CqnValidation to avoid StackOverflowError
- _[cds@5.8.0]_ At Node.js runtime, the `development` configuration profile is no longer active if `CDS_ENV` is set to `production` and `NODE_ENV` is undefined
- _[cds@5.8.0]_ Enterprise Messaging: The user is now privileged for AMQP
- _[cds@5.8.0]_ `cds.spawn` also works with synchronous functions
- _[cds@5.8.0]_ Foreign keys in parent are set to `null` when deleting composition of one
- _[cds@5.8.0]_ `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.
- _[cds@5.8.0]_ Better error message in case destination of Remote Service isn't found
- _[cds@5.8.0]_ Differentiate between draft already exists and entity locked
- _[cds@5.8.0]_ OData adapter: roll back transaction before re-throwing standard error in case of atomicity group
- _[cds@5.8.0]_ Results of actions/functions do not ignore custom data when using `$expand` query option
- _[cds@5.8.0]_ `req.data` is available in custom error handler in case of deserialization error thrown by legacy OData server
- _[cds@5.8.0]_ Joining entities with renamed foreign keys (limited to single-level projections)
- _[cds@5.8.0]_ Requests with draft and `$expand=*` caused problems in some cases
- _[cds@5.8.0]_ `cds serve` during development longer redirects URLs with similar path segments like `/browse/123/browse/` to for example, `/browse/`
- _[cds@5.8.0]_ Post-processing for renamed columns in expand
- _[cds@5.8.0]_ Deploy to SAP HANA: passing of options to `hdi-deploy` via `HDI_DEPLOY_OPTIONS` now possible
- _[cds@5.8.0]_ Keys as path segments in beta OData to CQN parser
- _[cds@5.8.0]_ OData V2 Remote Service (`"kind": "odata-v2"`):
  - Request data properties of types `cds.Date`, `cds.DateTime`, and `cds.Timestamp` are converted accordingly to OData V2 specification
  - 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
- _[cds@5.7.5]_ Instance-based restriction for activation of draft-enabled entities using `or` in restriction
- _[cds@5.7.5]_ Messaging: Duplicate handler execution if application service registered events twice
- _[cds@5.7.5]_ Post of a deeply nested sub-entity with structured parent keys
- _[cds@5.7.5]_ Negating lambda expressions in OData using the `not` operator
- _[cds@5.7.5]_ Event Mesh: Redelivery count when using AMQP
- _[cds@5.7.5]_ OData requests using lambda expressions on localized data
- _[cds@5.7.5]_ `cds.db.exists` wrongly generated a `SELECT * FROM ...` for OData flavor x4
- _[cds@5.7.5]_ Return localized texts on draft activate
- _[cds@5.7.5]_ Unicode characters in unquoted search terms in beta OData to CQN parser
- _[cds-mtx@2.5.2]_ API `/mtx/v1/provisioning/tenant` does no longer return duplicate tenants in case of concurrent API calls.
- _[cds-mtx@2.5.2]_ Dependencies to `VCAP_SERVICES` environment have been removed. Service dependencies can now be fully defined via `cds.env`, except for databases shared between tenants.
- _[cds-odata-v2-adapter-proxy@1.8.5]_ Prevent additional call to fill `content-disposition`, in case header is already provided with stream
- _[cds-odata-v2-adapter-proxy@1.8.5]_ Support OData V2 `binary` media upload via POST for entities with element of type `Binary` and without `@Core.MediaType` annotations
- _[cds-odata-v2-adapter-proxy@1.8.5]_ Return server error as response, if OData V4 server does not support media upload without `@Core.MediaType` annotation, for example, `No payload deserializer available for resource kind 'PRIMITIVE' and mime type 'image/png'`
