To guarantee reproducible builds, @sap/cds-dk now comes with pinned dependencies again. This is in line with our general recommendations on managing dependencies.
Creation of Manifest Files for Native Cloud Foundry Deployment
You can now use cds add cf-manifest to create a Cloud Foundry manifest.yml file. In addition, a services-manifest.yaml is created which integrates with the Create-Service-Push plugin of the cf CLI. This plugin can create the listed Cloud Foundry services before the actual application deployment.
A typical workflow is:
# one timecfinstall-pluginCreate-Service-Push# create the manifest and services-manifestcdsaddcf-manifest# ... adjust them to your needs# finally deploy the app and create the services in one gocfcreate-service-push
Unlike the manifest files generated by cds build in the gen folders, these new manifests are genuine sources that can be adjusted to your needs. The current implementation supports single tenant Node.js and Java applications. You can edit the created files, for example, to fit multitenant applications.
The following features are available for all editors based on our language server implementation for CDS in SAP Business Application Studio, Visual Studio Code, and Eclipse. The plugins are available for download for Visual Studio Code at Visual Studio Marketplace and for Eclipse at https://tools.hana.ondemand.com.
Processing for Fiori/OData annotations takes some time for larger models. It can now be disabled through user setting cds.contributions.enablement.odata.
When enabled, there's also an automatic detection for long running annotation support. It allows you to disable the annotation support temporarily. The detection can be disabled through user setting cds.contributions.enablement.longRunning.detect.
On PATCH and PUT, an UPDATE event is followed by a CREATE event if there was no matching entity. Hence, on a single PATCH/PUT, custom handlers for UPDATE and CREATE may be invoked.
On PUT, entity properties that weren't provided in the request payload nulled, or set to their default value, respectively.
Ignore Where Clause of View Definition During CREATE, UPDATE, and DELETE
If an entity based on a SELECT with a WHERE clause, this WHERE clause is ignored during CREATE, UPDATE, and DELETE events. In previous versions, an error was thrown if the entity was part of a remote service.
Request Lifecycle Events with Transactional Boundary
where conditions in @restrict annotations (instance-based authorization) are now validated. This could lead to the following error when using older @sap/cds versions in combination with the MTX sidecar:
Builder Methods for Standard Aggregate Functions
The Query Builder API now offers dedicated builder methods for the standard aggregate functions min, max, sum, average, and countDistinct. They're available as static methods on the CQL helper class as well as postfix methods on the Value interface: