---
versions:
  cdsjs: 6.3.2
  cdsdk: 6.3.2
  cdsc: 3.4.4
  cdsmtxs: 1.3.3
  java: 1.29.1

---

# October 2022

<ReleaseBadges />

[[toc]]

## CAP Sessions at SAP TechEd { #teched}

![](/resources/assets/sap-teched.svg){width="250px" style="float:right; margin: -10px 22px;"}

**Date**: November 15/16, 2022<br>
[**Register** now!](https://www.sap.com/about/events/teched.html)<br>

We are about to pack our bags for this year's SAP TechEd. Here is what we have planned as sessions around CAP:

- [Discover the Latest Innovations in CAP](https://go3.events.sap.com/sapteched/hybrid/2022/reg/flow/sap/saptech2022/sapteched2022catalog/page/catalog/session/1661202714774001CAb1): New and noteworthy things in CAP
- [Boost Verticalization, Customization, and Composition](https://go3.events.sap.com/sapteched/hybrid/2022/reg/flow/sap/saptech2022/sapteched2022catalog/page/catalog/session/1661198449398001XLB7): Learn about multitenancy, extensibility, and feature toggles
- [Bringing Service Integration to Your Fingertips](https://go3.events.sap.com/sapteched/hybrid/2022/reg/flow/sap/saptech2022/sapteched2022catalog/page/catalog/session/1661198449436001XsjT): See service integration with integration packages in action
- [Compose Full-Stack Apps in Business Application Studio](https://go3.events.sap.com/sapteched/hybrid/2022/reg/flow/sap/saptech2022/sapteched2022catalog/page/catalog/session/1661198449362001Xt1w): Build and deploy CAP applications in minutes using only visual editors

## Localization Support in Extensions

Within an extension, it's now possible to include i18n files, using the same approach as for standard applications

::: code-group

```properties [i18n/i18n.properties]
SalesRegion_name_col = Sales Region
Orders_priority_col = Priority
...
```

:::

[Learn more about localized extensions.](/@external/guides/extensibility/customization#localizable-texts){ .learn-more}

<span id="beforealpsflight" />

## SAP Fiori Analytical List Page for SFlight { #alp-sflight }

We have added an SAP Fiori [Analytical List Page](https://ui5.sap.com/#/topic/3d33684b08ca4490b26a844b6ce19b83) (ALP) to our [CAP SFlight](https://github.com/SAP-samples/cap-sflight) sample.

![A screenshot of an analytical list page based on SFlight.](assets/oct22/alp_sflight.png){ style="width:450px; box-shadow: 1px 1px 5px #888888" .adapt}

The ALP runs with the Node.js and the Java version of CAP SFlight.
Both runtimes support the relevant queries out of the box.
That means, you just have to set the required annotations without the need of custom handler implementations.

::: warning
Within the SFlight repository, to enable all features for the ALP in the Node.js runtime, we've switched on the new OData parser (`odata_new_parser: true`), which is still **experimental**. If you use the ALP with the standard OData parser, some features like grouping in the analytical table are not available.
:::

## CDS Language & Compiler { #cds}

### Reusing Annotations

Now, it is possible to extend a view or a projection with an aspect that only contains annotations.
Use this to write lengthy annotations like for instance-based authorization only once and
reuse them for several entities:

```cds
@restrict: [{ grant: ['READ', 'WRITE'], where: 'CreatedBy = $user' }]
aspect RestrictToOwner {};

extend Orders with RestrictToOwner;
extend Vendors with RestrictToOwner;
```

Extending an entity with an aspect is the same as including the aspect. Thus, applying
an annotation directly to the entity overwrites the same annotation coming from an aspect.

[Learn more about Named Aspects.](/@external/cds/cdl#named-aspects){ .learn-more}

## Node.js { #cds-js}

### Consumption of Dead Letter Queue

In messaging, to receive all messages without creating subscriptions, you can register on `*`.

### Simplified Usage of Correlated Sub-Queries

In the fluent query API, we have eased the construction of where exists clauses.

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

To support those clauses, we've introduced a dedicated method `.alias()` to choose table aliases.

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

[Learn more about Constructing Queries.](/@external/node.js/cds-ql#constructing-queries){ .learn-more}

### SAP-Specific EDMX Annotations Respected in Service Consumption

SAP-specific properties like `sap:display-format="Date"` are respected in EDMX importer and runtime.

```js
service.insert({ name: 'Edgar Allan Poe', birthdate: '1809-01-19' }).into(Authors)
```

The payload of this query will be automatically transformed to match the expected EDM format of the remote system, in this case `1809-01-19T00:00:00`.

## Java { #cds-java}

### Important Changes ❗️ { .important #important-changes-in-java}

Starting with this release, property `cds.install-cdsdk.version` of goal `install-cdsdk` in the `cds-maven-plugin` is **mandatory and needs to be explicitly maintained by the application**. This property specifies the `@sap/cds-dk` version used for CDS build. Previously it was optional and had the default value `^4`.
Note that the build stops if this property is missing. If your configuration is not prepared yet, find a detailed description how to set this property in [Using a specific cds-dk Version](/@external/java/developing-applications/building#cds-maven-plugin).

### Significant Performance Optimizations

Recently, there has been a focus on eliminating performance hotspots in the CAP Java runtime.
According to measurements of basic OData requests such as fetching a full entity set (`GET /Travel`) in [SFlight](https://github.com/SAP-samples/cap-sflight) application, CPU usage has been significantly reduced. The following table shows some examples (CPU consumption compared to version 1.26.0):

| OData Request<sup>1</sup> | CAP Java 1.29.0 |
| --- | --- |
| `GET /Travel?$top=1000`  | down to 31% |
| `GET /Travel?$expand=to_Agency`  | down to 39% |
| `GET /Travel?$expand=to_Booking($expand=to_Carrier)` | down to 21% |
| `GET /Travel?$search=Japan` | down to 46% |

> <sup>1</sup> No authorization and in-memory DB H2

Performance optimizations are still ongoing, so stay tuned for more improvements.

### H2 2.x as Default Database

CAP Java now supports H2 version 2.x. In Spring, H2 is automatically initialized as in-memory database when the H2 JDBC driver is present on the classpath.

For H2, you need to configure the CDS Compiler to use the new SQL [dialect `h2`](/@external/java/cqn-services/persistence-services#h2), which is specific for H2 2.x.

```sh
cds deploy --to h2 --dry
```

The `cds-services-archetype` now generates a new CAP Java project with H2 2.x as in-memory database.

### Support for Download Repositories with Authentication

The goal `install-node` of the `cds-maven-plugin` triggers the download of a Node.js contribution from a remote repository.
To support repositories that require authentication (for example, internet facing location), the goal has been enhanced with a new optional property `cds.install-node.serverId`, which refers to a server configuration in maven's `settings.xml` file. When setting up a connection to the remote repository to download Node.js, `install-node` now uses provided credentials from this server configuration.

### Create CDS QL Statements from Results

[Entity References](/@external/java/working-with-cql/query-execution#entity-refs) can now also be obtained from the result rows of insert and update operations. The references address the entity via the key values from the result row and can be used in CDS QL statements:

```java
CqnUpdate update = Update.entity(AUTHOR).data("name", "James Joyce").byId(101);
Author joyce = service.run(update).single(Author.class);

CqnSelect q = Select.from(joyce.ref().books());
```
