The syntax `Books.id` (dot) is deprecated and is warned about in the latest CDS releases. It should be replaced by either `Books:id` (colon, supported since cds-compiler v1.41.0) or `type of Books:id` (tested with cds-compiler v1.20.0 from November 2019).
11 lines
324 B
Plaintext
11 lines
324 B
Plaintext
using { sap.capire.bookshop as my } from '../db/schema';
|
|
service CatalogService @(path:'/browse') {
|
|
|
|
@readonly entity Books as SELECT from my.Books {*,
|
|
author.name as author
|
|
} excluding { createdBy, modifiedBy };
|
|
|
|
@requires_: 'authenticated-user'
|
|
action submitOrder (book : type of Books:ID, amount: Integer);
|
|
}
|