[Part – 2] Enrich CAP based Services with Behaviors using Annotations
The second half of a two-part walkthrough of CAP's behavioral annotations, following on from access control and input validation in the first part. This post works through @cds.autoexpose, @cds.api.ignore, @cds.persistence.exists/skip, @cds.on.insert/@cds.on.update and the @odata.Type/@odata.singleton mapping overrides, all shaping how a CDS model is projected into a service, which is data modellingData modellingDefining the shape of data before anything serves it: entities and their types, how they relate, and the projections and views that services and applications consume.SAP and community, unassessed. Alongside these it covers @cds.query.limit for default and maximum page sizes (pagination and streamingPagination and streamingReturning results a client can consume without loading everything — server-driven paging, and streaming large binaries rather than buffering them.SAP only), @odata.etag with exclusive and shared locks for optimistic concurrency (concurrency controlConcurrency controlStopping two people who opened the same record from silently overwriting each other — detecting that the version you read is no longer the version you are saving over.SAP and community, unassessed), and @cds.search for scoping $search to chosen elements (searchSearchFree-text search across an entity and its compositions, pushed into the database rather than filtered in the service. Declared search, database similarity search and filtering in application code are often lumped together.SAP and community, unassessed), each with a CDS code example.
Where it sits
Who is behind it
In the atlas: contributes to 1, wrote 2@pandayoauthor
Properties
About this work
Details
Graph
Source
History
- Entered the atlasDiscovered via SAP Community · cap-tag.
For your agent
- Ref
content:part-2-enrich-cap-based-services-with-behaviors-using-annotations- JSON
- /content/part-2-enrich-cap-based-services-with-behaviors-using-annotations.json
- MCP
- Connecting an agent