Search

June 2020

Welcome to the notes for the June 2020 release for the CAP framework. Find the most noteworthy news and changes in the following sections.

See also: Latest Changelog

Important Changes❗️

Move from npm.sap.com to npmjs.org

@sap Node.js packages have moved from https://npm.sap.com to the default registry https://registry.npmjs.org.

As future versions are going to be published only there, please make sure to adjust your registry with:

npm config delete "@sap:registry"

See our Troubleshooting guide for more details.

Docs and Samples

Search Results in Browser History

When you search through the documentation (the little magnifying glass), the search is now stored in the browser history. This way, you can come back to the search list after you have navigated to the results. Also, you can now bookmark and share your search. Just copy the .../search?q=... URL from your browser address bar.

New and Revised Sections and Guides

New Guides and Sections:

Revised Guides and Sections:

Java Runtime

Implicit Paging and Sorting

By default, the generic handlers for READ requests automatically truncate result sets to a size of 1,000 records max (implicit pagination). The default page size can be controlled by means of the CDS annotation @cds.query.limit.default per service or application configuration property cds.query.limit.default. The maximum value can be controlled by means of the CDS annotation @cds.query.limit.max per service or the global application configuration property cds.query.limit.max.

In addition, the result is implicitly sorted. By default the entity’s primary key is used as sort criterion. This feature can be turned off by means of the application configuration property cds.query.implicitSorting.enabled: false.

OData Singletons

Read requests on entities annotated with @odata.singleton are now supported.

Asynchronous Tenant Subscription API

The Java runtime now supports asynchronous tenant subscription requests on the SAP Cloud Platform. This is useful if tenant onboarding takes much time and would hit the timeout of a synchronous tenant subscription.

Fiori Drafts

Added support for $orderby, $top, and $skip for draft enabled entities.

Input Validation

You can now validate enums by means of the annotation @assert.range.

Clean Project Setup

Projects created with the CAP Java archetype now use the CDS Maven Plugin during build. This plugin replaces a bunch of 3rd party plugins and boiler plate pom.xml code, making newly created projects much cleaner.

Improved ETag Support

  • ETag conditions on $metadata endpoints are now evaluated. OData responses also now contain the @metadataEtag field.
  • ETag conditions on OData bound actions or function requests are now evaluated. ETag conditions evaluated through selection now lock the affected row for update.
  • The OData entity response field @etag (>= 4.01) or @odata.etag (4.0) is now set when returning collections of entities or expanded entities that have an ETag.

CDS.QL

Bug Fixes

  • Fixed a bug where exception messages of non-framework exceptions were displayed to the end user, despite non-custom error messages being disabled.
  • Fixed a bug where a null OData function argument value caused a NullPointerException.
  • Fixed a bug where multiple Spring contexts caused prevented the app from being started.
  • UUIDs in OData requests are now normalized by converting them to lowercase.
  • An UnsupportedOperationException is thrown on deep updates with more than one entry.