Added workaround for bug in compiler

This commit is contained in:
Daniel
2020-03-08 14:02:33 +01:00
parent d8d3b57929
commit 79d624e798
3 changed files with 10 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
# Bookshop Getting Started Sample
This sample introduces the essential tasks in the development of CAP-based services as also covered in the [Getting Started guide in capire](https://cap.cloud.sap/docs/get-started/in-a-nutshell).
This stand-alone sample introduces the essential tasks in the development of CAP-based services as also covered in the [Getting Started guide in capire](https://cap.cloud.sap/docs/get-started/in-a-nutshell).
## Hypothetical Use Cases

View File

@@ -11,3 +11,12 @@ extend Books with {
/** Average rating */
rating : Reviews.rating;
}
//////////////////////////////////////////////////////////////////////////////
// BUG in compiler: we have to force-include cat-service after admin-service
// see cap/issues#111; when fixed we can rempve these lines
//
using from '@capire/bookshop/srv/admin-service';
using from '@capire/bookshop/srv/cat-service';
//
//////////////////////////////////////////////////////////////////////////////

View File

@@ -20,7 +20,6 @@ cds.on('listening', async()=>{
// return tx.update (Books, subject) .with ({rating})
})
console.log (Reviews.name)
// delegate requests to read reviews to ReviewsService
CatalogService.impl (srv => {
srv.on ('READ', 'Books/reviews', (req) => {