From 34f75b52c82c48d5ce4aff5e782eff6d2186ef56 Mon Sep 17 00:00:00 2001 From: "Dr. David A. Kunz" Date: Thu, 26 Jun 2025 13:36:03 +0200 Subject: [PATCH] add children as composition --- bookshop/db/schema.cds | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bookshop/db/schema.cds b/bookshop/db/schema.cds index 903e5ca6..6ad597b6 100644 --- a/bookshop/db/schema.cds +++ b/bookshop/db/schema.cds @@ -33,11 +33,12 @@ entity Genres : sap.common.CodeList { /** Hierarchically organized entity for Contents */ entity Contents { - key ID : UUID; - name : String; - page : Integer; - parent : Association to Contents; - book : Association to Books; + key ID : UUID; + name : String; + page : Integer; + parent : Association to Contents; + children : Composition of many Contents on children.parent = $self; + book : Association to Books; } type Price : Decimal(9,2);