Simplifying samples
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user