Skip to content

Commit 52d6797

Browse files
authored
fix: use cds.entities(<namespace>) (#213)
... to get definitions not exposed by the current service (i.e., `this`)
1 parent 90a4d6e commit 52d6797

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/resources/bookshop/srv/cat-service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const cds = require('@sap/cds')
22

33
class CatalogService extends cds.ApplicationService { init(){
44

5-
const { Books } = this.entities ('sap.capire.bookshop')
5+
const { Books } = cds.entities ('sap.capire.bookshop')
66

77
// Reduce stock of ordered books if available stock suffices
88
this.on ('submitOrder', async req => {

0 commit comments

Comments
 (0)