.
This commit is contained in:
@@ -3,17 +3,17 @@ namespace sap.capire.orders;
|
||||
|
||||
entity Orders : cuid, managed {
|
||||
OrderNo : String @title:'Order Number'; //> readable key
|
||||
Items : Composition of many Orders_Items on Items.up_ = $self;
|
||||
Items : Composition of many Orders.Items on Items.up_ = $self;
|
||||
buyer : User;
|
||||
currency : Currency;
|
||||
}
|
||||
|
||||
entity Orders_Items {
|
||||
entity Orders.Items {
|
||||
key ID : UUID;
|
||||
up_ : Association to Orders;
|
||||
/*key*/ up_ : Association to Orders; // REVISIT: 'key' doesn't work due to bug in runtime
|
||||
product : Association to Products @assert.integrity:false; // REVISIT: this is a temporary workaround for a glitch in cds-runtime
|
||||
amount : Integer;
|
||||
title : String; //> intentionally replicated as snapshot from product.title
|
||||
title : String; //> intentionally replicated as snapshot from product.title or alike
|
||||
price : Double;
|
||||
}
|
||||
|
||||
@@ -21,3 +21,7 @@ entity Orders_Items {
|
||||
entity Products @(cds.persistence.skip:'always') {
|
||||
key ID : String;
|
||||
}
|
||||
|
||||
|
||||
// REVISIT: below is a workaround for a GAP in Fiori elements, which crashes for proxies
|
||||
// annotate Products with @cds.autoexpose;
|
||||
Reference in New Issue
Block a user