Regression in v0.0.3 in CQN2HANA
willemi069808 opened this issue · 3 comments
willemi069808 commented
There is a regression in v0.0.3: an error is thrown when reading from a service.
Reproduce:
cds init
cds add tiny-sample,mta
cds add hana,xsuaa --for hybrid
npm install @cap-js/hana
module.exports = srv => {
srv.after('READ', 'Books', each =>{
console.log(each);
})
}
Output:
[odata] - GET /odata/v4/catalog/Books
[cds] - ❗️Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at CQN2HANA.param (/Users/i069808/Software/test_scientific/node_modules/@cap-js/db-service/lib/cqn2sql.js:741:13)
at CQN2HANA.expr (/Users/i069808/Software/test_scientific/node_modules/@cap-js/db-service/lib/cqn2sql.js:671:40)
at Object.toString (/Users/i069808/Software/test_scientific/node_modules/@cap-js/db-service/lib/cqn2sql.js:791:93)
at Array.join (<anonymous>)
at Array.toString (<anonymous>)
at CQN2HANA.func (/Users/i069808/Software/test_scientific/node_modules/@cap-js/db-service/lib/cqn2sql.js:792:88)
at CQN2HANA.expr (/Users/i069808/Software/test_scientific/node_modules/@cap-js/db-service/lib/cqn2sql.js:675:39)
at CQN2HANA.xpr (/Users/i069808/Software/test_scientific/node_modules/@cap-js/hana/lib/HANAService.js:748:28)
at CQN2HANA.expr (/Users/i069808/Software/test_scientific/node_modules/@cap-js/db-service/lib/cqn2sql.js:674:38)
at /Users/i069808/Software/test_scientific/node_modules/@cap-js/hana/lib/HANAService.js:444:30 {
id: '1899821',
level: 'ERROR',
timestamp: 1703082823430
}
test_scientific | |
---|---|
Node.js | v18.16.0 |
@sap/cds | 7.5.0 |
@sap/cds-compiler | 4.5.0 |
@sap/cds-dk | 7.5.0 |
@sap/cds-dk (global) | 7.5.0 |
@sap/eslint-plugin-cds | 2.6.4 |
@sap/cds-mtxs | 1.14.0 |
patricebender commented
@BobdenOs could you have a look?
BobdenOs commented
@willemi069808 Sorry for the inconvenience. This is caused by the db-service version not being bumped in the 0.0.3 release. Please make sure you are using the last db-service version together with the 0.0.3 Hana version.
willemi069808 commented
That solves it, thanks!