From 2a44cfa9dcd8e3e88b62081140a8fa0cd5cc0ea2 Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 21:25:33 +0100 Subject: [PATCH] add Authors, rename author attribute --- bookshop/srv/cat-service.cds | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bookshop/srv/cat-service.cds b/bookshop/srv/cat-service.cds index db9724d1..a8ac0f88 100644 --- a/bookshop/srv/cat-service.cds +++ b/bookshop/srv/cat-service.cds @@ -15,12 +15,18 @@ service CatalogService @(path : '/browse') { */ @readonly entity Books as projection on my.Books { - * , author.name as author + * , author.name as authorName } excluding { createdBy, modifiedBy }; + @readonly + entity Authors as projection on my.Authors excluding { + createdBy, + modifiedBy + }; + @requires : 'authenticated-user' action submitOrder(book : Books:ID, quantity : Integer) returns { stock : Integer