Test extend with composition
This commit is contained in:
@@ -10,12 +10,22 @@
|
||||
//
|
||||
using { sap.capire.bookshop.Books } from '@capire/bookshop';
|
||||
using { ReviewsService.Reviews } from '@capire/reviews';
|
||||
using { managed, cuid } from '@sap/cds/common';
|
||||
|
||||
extend Books with {
|
||||
reviews : Composition of many Reviews on reviews.subject = $self.ID;
|
||||
rating : type of Reviews:rating; // average rating
|
||||
numberOfReviews : Integer @title : '{i18n>NumberOfReviews}';
|
||||
Y_characteristics : Composition of many Y_Characteristic on Y_characteristics.parent = $self;
|
||||
}
|
||||
|
||||
entity Y_Characteristic : cuid, managed {
|
||||
parent : Association to one Books;
|
||||
characteristicId : String;
|
||||
name : String;
|
||||
value : String;
|
||||
uom : String;
|
||||
}
|
||||
|
||||
//
|
||||
// Extend Orders with Books as Products
|
||||
|
||||
Reference in New Issue
Block a user