From caf086e4a7a0d9dad9f1759aa4a65904f8236a39 Mon Sep 17 00:00:00 2001 From: Akshat Jain <72684535+akshatjain-official@users.noreply.github.com> Date: Fri, 25 Apr 2025 11:14:06 +0530 Subject: [PATCH 1/2] Update attachment-extension.cds Multiple attachments --- cap-notebook/demoapp/srv/attachment-extension.cds | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cap-notebook/demoapp/srv/attachment-extension.cds b/cap-notebook/demoapp/srv/attachment-extension.cds index 67183bda..f299b382 100644 --- a/cap-notebook/demoapp/srv/attachment-extension.cds +++ b/cap-notebook/demoapp/srv/attachment-extension.cds @@ -4,6 +4,12 @@ using {sap.attachments.Attachments, sap.attachments.StatusCode} from`com.sap.cds extend entity Books with { attachments : Composition of many Attachments @SDM.Attachments:{maxCount: 4, maxCountError:'Only 4 attachments allowed.'}; } +extend entity Books with { + references : Composition of many Attachments @SDM.attachments: {maxCount: 2, maxCountError: 'Only 2 attachments allowed'}; +} +extend entity Books with { + footnotes : Composition of many Attachments; +} entity Statuses @cds.autoexpose @readonly { key code : StatusCode; From 72914cc6a925ec1419c8f2afcc78b3c6e2ab4692 Mon Sep 17 00:00:00 2001 From: Akshat Jain <72684535+akshatjain-official@users.noreply.github.com> Date: Fri, 25 Apr 2025 11:47:08 +0530 Subject: [PATCH 2/2] Update attachment-extension.cds --- cap-notebook/demoapp/srv/attachment-extension.cds | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cap-notebook/demoapp/srv/attachment-extension.cds b/cap-notebook/demoapp/srv/attachment-extension.cds index f299b382..a6f8f607 100644 --- a/cap-notebook/demoapp/srv/attachment-extension.cds +++ b/cap-notebook/demoapp/srv/attachment-extension.cds @@ -3,11 +3,7 @@ using {sap.attachments.Attachments, sap.attachments.StatusCode} from`com.sap.cds extend entity Books with { attachments : Composition of many Attachments @SDM.Attachments:{maxCount: 4, maxCountError:'Only 4 attachments allowed.'}; -} -extend entity Books with { references : Composition of many Attachments @SDM.attachments: {maxCount: 2, maxCountError: 'Only 2 attachments allowed'}; -} -extend entity Books with { footnotes : Composition of many Attachments; }