#BTP #SAPCAP: Quirky Nuggets (N01-N02)
Walks through two CAP gotchas: the on/before/after phases of custom event handlers, shown with an after handler whose edits only reach the result when the handler returns an object or array, never a primitive; and the @assert.unique annotation, which builds a database uniqueness constraint from the model. For Input validationInput validationRejecting bad input before it reaches the database. While this can be done manually inside a handler, there are solutions in place to derive type, range, enum and mandatory checks from the model definitions.SAP and community, unassessed, the catch is that once the constrained property is nested, @assert.unique must name it by its model dot path (assignment.type) rather than the flattened column 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 compiles it to (assignment_type).
Where it sits
Who is behind it
In the atlas: contributes to 1, wrote 3@AjitKP91author
Properties
About this work
Details
Graph
Source
History
- Entered the atlasDiscovered via SAP Community · cap-tag.
For your agent
- Ref
content:btp-sapcap-quirky-nuggets-n01-n02- JSON
- /content/btp-sapcap-quirky-nuggets-n01-n02.json
- MCP
- Connecting an agent