Simplifying samples

This commit is contained in:
Daniel
2021-06-08 18:20:44 +02:00
parent 05cdb67329
commit 02f19e295d
8 changed files with 58 additions and 19 deletions

View File

@@ -3,17 +3,17 @@
// Mashing up imported models...
//
using { sap.capire.bookshop.Books } from '@capire/bookshop';
//
// Extend Books with access to Reviews and average ratings
//
using { CatalogService.ListOfBooks, sap.capire.bookshop.Books } from '@capire/bookshop';
using { ReviewsService.Reviews } from '@capire/reviews';
extend Books with {
reviews : Composition of many Reviews on reviews.subject = $self.ID;
rating : Decimal;
rating : Reviews:rating;
}
extend projection ListOfBooks with { rating }
//
// Extend Orders with Books as Products