From 04d659c9c24309fc674a297815786a4b6952c77e Mon Sep 17 00:00:00 2001 From: Daniel Hutzel Date: Wed, 16 Jul 2025 17:25:32 +0200 Subject: [PATCH] more comments --- bookshop/srv/x-validation.cds | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bookshop/srv/x-validation.cds b/bookshop/srv/x-validation.cds index 3aeca373..8326afd3 100644 --- a/bookshop/srv/x-validation.cds +++ b/bookshop/srv/x-validation.cds @@ -28,9 +28,9 @@ view Books.constraints as select from Books { ID, null as genre, // multiple constraints: mandatory + assert target + special + author.ID is null ? 'is missing' : // FIXME: 1) // TODO: 2) not exists author ? 'Author does not exist: ' || author.ID : - author.ID is null ? 'is missing' : // FIXME: 1) - count(author.books.ID) -1 > 1 ? author.name || ' already wrote too many books' : // TODO: 2) + count(author.books.ID) -1 > 1 ? author.name || ' already wrote too many books' : // TODO: 3) null as author, } group by ID; @@ -39,7 +39,9 @@ view Books.constraints as select from Books { ID, // apparently that is not the case -> move one line up // and run test to see the erroneous impact. -// 2) TODO: we should support count(author.books) +// 2) TODO: we should allow to write author is null instead of author.ID is null + +// 3) TODO: we should support count(author.books) /**