BlogBlogtypeA post on somebody's own site or a community platform. Nobody edits it after publication, so it dates from the day it was written.See every one →SAP Community

Computed field example in CAP

An answer to a Community question — how to count the entities on the far side of an association — written up as a short post rather than left in a thread. The answer combines CDS with Node.js service events, which is the seam worth noticing: some of what looks like modelling is expressed in the model and some has to be computed when the request arrives, and the boundary between them is not obvious from either side.

Where it sits

Explains
Data modellingCAPData modellingcapabilityDefining 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.
Since then
Data modelling has changed 3 times since this was published, most recently in @sap/cds 9.9.0, 2026-04-23
Source
reachable

Who is behind it

DJ AdamsDJ AdamsPersonWrote this
Developer Advocate
In the atlas: contributes to 20, wrote 22
@qmacro
author

Before you read it

read from the page
ApplicabilityCore changedData modelling has changed 3 times since this was published, most recently in @sap/cds 9.9.0, 2026-04-23.

This is a derived prompt to re-check the work, not a claim that the work is wrong. Exact stale statements are recorded separately after editorial review.

Properties

About this work

declared and crawled
Published
declared
Published on
declared
Views
crawled
19,296

What was found on the page

derived
Prose
derived
841 words
Numbered steps
derived
3
Code blocks
derived
10

For data-modelling

on the edge
Applies in
authored
cap

More on this38

Group by37 of 37 pieces
Piece, what it offersStill applies
Also explainingData modelling17
Deep Insert in SAP CAPM Using Composition and Fiori Elements
SAP Community, Talari Hari KumarThe reasoningA recipeRunnable code
nothing recorded
Building an Enterprise Application Using Fiori Elements and CAP - Part 1
SAP Community, Farooq, part 1 of 3The reasoning
nothing recorded
Create CDS Views and expose through OData service in CAPM
SAP Community, VenkateshMundru
nothing recorded
A CAP Plugin for Flexible Number Range Management: cds-numberrange-plugin
SAP Community, abdulbasitThe reasoningRunnable code
nothing recorded
Understanding Projections in CAPM: Select Only What You Need!
SAP Community, Avisek_The reasoning
nothing recorded
CAP, CDS, CDL, CSN and jq - finding associations
SAP Community, DJ AdamsThe reasoning
nothing recorded
SAP CAP(Cloud Application Programming)开发框架概述
SAP Community, ArthurYang
nothing recorded
#CAP-TechBytes Input Validation
SAP Community, ThajunnizaThe reasoning
nothing recorded
SAP CAP Recent Enhancements the HANA Dev Should Know About
SAP Community, Thomas Jung
nothing recorded
SAP CAP Adapter to expose OData as custom REST Service
SAP Community, Former Member
nothing recorded
Creating structured types, enums and named aspects using the CDS Graphical Modeler
SAP Community, Xiao-fei_SongThe reasoning
nothing recorded
Importing @sap/cds common.cds to your CAP project using the CDS Graphical Modeler
SAP Community, Xiao-fei_Song
nothing recorded
First Java Cap Application
SAP Community, bruce_wang3
nothing recorded
SAP Cloud Platform Backend service: Tutorial [11]: CDS : magic: key: generation
SAP Community, CarlosRoggan
nothing recorded
Develop a full stack Business application with SAP Cloud Application Programming Model
SAP Community, former_member584731
nothing recorded
Learn how to define constraints declaratively in your CDS model
SAP Developer Center, SAPThe reasoningA recipe
nothing recorded
Analyze and optimize ABAP Cloud model apps built on core data services
SAP TechEd — session catalogueThe reasoning
nothing recorded
Also byDJ Adams21
CAP, CDS, CDL, CSN and jq - finding associations
SAP Community, DJ AdamsThe reasoning
nothing recorded
CAP in the age of AI #7 - vector embeddings wrap-up
YouTube — SAP Developers playlists, DJ Adams, Johannes Vogt, part 7 of 7
nothing recorded
CAP in the age of AI #6 - vector embeddings
YouTube — SAP Developers playlists, DJ Adams, Johannes Vogt, Daniel Schlachter, part 6 of 7
nothing recorded
Custom Business Logic Extensibility in CAP (CDS-Oyster)
YouTube — SAP Developers playlists, Nick Josipovic, DJ Adams
nothing recorded
CAP in the age of AI #5 - agents wrap-up
YouTube — SAP Developers playlists, DJ Adams, Johannes Vogt, Simon Engel, Stefan Rudi, Daniel Schlachter, part 5 of 7
nothing recorded
What's in Daniel Hutzel's brain?
YouTube — SAP Developers playlists, Daniel Hutzel, DJ Adams
nothing recorded
CAP in the age of AI #4 - more on agents
YouTube — SAP Developers playlists, DJ Adams, Johannes Vogt, part 4 of 7
nothing recorded
CAP in the age of AI #3 - from MCP to A2A
YouTube — SAP Developers playlists, DJ Adams, Johannes Vogt, Stefan Rudi, part 3 of 7
nothing recorded
CAP in the age of AI #2 - more on the MCP adapter
YouTube — SAP Developers playlists, DJ Adams, Johannes Vogt, Simon Engel, Stefan Rudi, part 2 of 7
nothing recorded
Add MCP capabilities to a CAP service
SAP Developer Center, DJ AdamsThe reasoningA recipe
nothing recorded
CAP in the age of AI #1 - the MCP adapter
YouTube — SAP Developers playlists, DJ Adams, Johannes Vogt, Simon Engel, Stefan Rudi, Daniel Schlachter, part 1 of 7
nothing recorded
CAP in the age of AI
YouTube — SAP Developers playlists, DJ Adams, Johannes Vogt, Simon Engel, Stefan Rudi, Daniel Schlachter
nothing recorded
Avoid design time CAP server restarts when maintaining local data files
SAP Community, DJ AdamsThe reasoningRunnable code
Core changed
CAP, CORS and custom headers
SAP Community, DJ AdamsThe reasoningRunnable code
nothing recorded
ISO content for common CAP types
SAP Community, DJ AdamsThe reasoningRunnable code
Core changed
CAP is important because it's not important
SAP Community, DJ AdamsThe reasoning
nothing recorded
Set up VS Code on Chrome OS for local Application Programming Model development
SAP Community, DJ AdamsThe reasoningRunnable code
Core changed
SAP Cloud Application Programming Model (CAP) - start here
SAP Community, DJ AdamsThe reasoning
nothing recorded
CAP Node.js Expert Session #6 - The MCP Adapter
YouTube — SAP Developers playlists, Daniel Schlachter, DJ AdamsThe reasoningA recipe
nothing recorded
Examine the details of the Model Context Protocol on startup
SAP Developer Center, DJ AdamsThe reasoningA recipe
nothing recorded
Define, generate, deploy: AI-driven spec-first Terraform
SAP TechEd — session catalogue, Christian Lechner, DJ AdamsA recipe
nothing recorded

Details

Graph4 edges
← POINTS HERE
POINTS OUT →
explainsData modellingcapability, core and community
published onSAP Communitypublishing source
discovered viaSAP Communitycap-tag
Source
Type
blog
Published on
Host
community.sap.com
First seen
History2
  • explains → applies_to on capability:data-modelling (cap)Door scope proposed from the title and summary, so a door page lists the piece only where it holds (docs/concepts/content-on-doors.md).
  • Entered the atlasDiscovered via SAP Community · cap-tag.
For your agent
Ref
content:computed-field-example-in-cap
JSON
/content/computed-field-example-in-cap.json
MCP
Connecting an agent