Added workaround for bug in compiler
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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';
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user