May 2022
Welcome to the release of CAP. Find the most noteworthy news and changes in the following sections.Java SDK
Important Changes ❗️
UUIDs in CSV Import
Values imported from the CSV files for fields having type UUID and annotated with @odata.Type: 'Edm.String' are no longer normalized.
@assert.target
The annotation @assert.target can be used to ensure that the target of managed to-one association exists:
cds
entity Books : cuid {
title : String;
}
entity Orders : cuid {
items : Composition of many {
key position : Integer;
@assert.target
book : Association to book;
}
}When an order is created the runtime will assert that the referenced book actually exists in the database.
Auto-Build
The 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.