10 exam-style questions with answers and explanations, straight from our 1,030-question bank. Tap an answer to check yourself. When you're ready, take the scored version in the free practice test.
A CAP service exposes an entity as a projection. The project contains no JavaScript or Java implementation file at all. A client sends a GET request using $filter and $expand. What is the result?
Show answer & explanation
Correct answer: C - CAP's generic providers serve the request, applying filter and expand
Question 2
A developer seeds data using db/data/my.bookshop-Books.csv with the header row ID;title;author. The books load successfully, but every book's author association is empty. What is wrong?
Show answer & explanation
Correct answer: A - The column must be named author_ID to match the generated foreign key
Question 3
A service must expose an operation that recalculates and updates the totals of an order. Which construct should be used, and what must the developer provide?
Show answer & explanation
Correct answer: D - An action, implemented in a custom on handler
Question 4
An Order must own its OrderItems: deleting an order must delete its items, and a client must be able to create an order together with its items in a single request. Which modelling construct provides both behaviours?
Show answer & explanation
Correct answer: B - Composition of many OrderItems on items.parent = $self
Question 5
Within a service that carries no service-level authorization annotation, an entity is annotated @restrict: [{ grant: 'READ' }] with no 'to' key specified. Who is able to read the entity?
Show answer & explanation
Correct answer: D - Everyone, including users who are not authenticated
Question 6
A developer registers srv.on('READ', 'Books', ...) and the handler returns a value without ever calling next(). What happens to CAP's default database read?
Show answer & explanation
Correct answer: B - It does not run, because the custom handler replaces the generic one
Question 7
A developer has installed the Cloud Foundry CLI and successfully produced an .mtar archive. Running cf deploy returns an unknown-command error. What is missing?
Show answer & explanation
Correct answer: A - The MultiApps CF CLI plugin, which provides cf deploy
Question 8
A developer runs npm install @cap-js/hana instead of cds add hana. Which step does the npm command leave undone?
Show answer & explanation
Correct answer: D - Updating the project configuration so CAP uses SAP HANA
Question 9
Besides writing a model file into srv/external/, what else does cds import change in the project?
Show answer & explanation
Correct answer: A - It adds a cds.requires entry for the imported service
Question 10
A handler validates three separate fields and must report every failure to the client in a single response. Which approach achieves this?
Show answer & explanation
Correct answer: B - Call req.error() once for each field that fails validation
That's 10 of 1,030
The full bank has 1,020 more C_CPE_2601 questions with explanations.