{"ref":"content:part-2-enrich-cap-based-services-with-behaviors-using-annotations","page":"/content/part-2-enrich-cap-based-services-with-behaviors-using-annotations","json":"/content/part-2-enrich-cap-based-services-with-behaviors-using-annotations.json","generated":"2026-10-30","drafted_with_ai":true,"entity":{"id":"part-2-enrich-cap-based-services-with-behaviors-using-annotations","title":"[Part – 2] Enrich CAP based Services with Behaviors using Annotations","url":"https://community.sap.com/t5/technology-blog-posts-by-sap/part-2-enrich-cap-based-services-with-behaviors-using-annotations/ba-p/13556413","content_type":"blog","published_on":"source:sap-community","explains":["capability:data-modelling","capability:pagination-and-streaming","capability:concurrency-control","capability:search"],"summary":"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 modelling](capability:data-modelling). Alongside these it covers @cds.query.limit for default and maximum page sizes ([pagination and streaming](capability:pagination-and-streaming)), @odata.etag with exclusive and shared locks for optimistic concurrency ([concurrency control](capability:concurrency-control)), and @cds.search for scoping $search to chosen elements ([search](capability:search)), each with a CDS code example.","authors":["actor:pandayo"],"published":"2023-01-29","provenance":{"discovered_via":[{"source":"source:sap-community","channel":"cap-tag"}],"first_seen":"2026-10-25"},"drafted_with_ai":true},"readings":{"liveness":[{"label":"Checked against the source","tier":"unknown","evidence":"nobody has checked it"},{"label":"Source reachable","tier":"unknown","evidence":"not crawled"},{"label":"Age","tier":"poor","evidence":"published 45 months ago"}],"compatibility":[{"label":"Version","tier":"unknown","evidence":"no version declared"},{"label":"Moved since?","tier":"good","evidence":"no recorded change after 2023-01-29"},{"label":"Findings","tier":"good","evidence":"none flagged"}],"reach":[{"value":null,"unit":"views"},{"value":null,"unit":"comments"},{"value":null,"unit":"likes"}]},"signals":null,"series":null,"edges":{"authors":[{"ref":"actor:pandayo","name":"Lukas Schwabe","json":"/actors/pandayo.json"}]}}