Simplifying samples
This commit is contained in:
11
reviews/test/bookshop/services.cds
Normal file
11
reviews/test/bookshop/services.cds
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace sap.capire.bookshop; //> allows UPDATE('Books')...
|
||||
//
|
||||
// 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 : Reviews:rating;
|
||||
}
|
||||
extend projection ListOfBooks with { rating }
|
||||
Reference in New Issue
Block a user