on 2020 Jul 03 4:31 PM
Hi
We use CAP, which calls a custom CDS, when using a filter condition like startswith, this get's translated to an object like:
[
{ ref: [ 'Column' ] },
'like',
{ func: 'concat', args: [ { val: 'VAL' }, "'%'" ] }
]
Then a dump occurs with the following error message:
[2020-07-03T15:27:13.365Z | ERROR | 1810204]: Feature not supported: Method .func of fluent API
[2020-07-03T15:27:13.366Z | ERROR | 1810204]: Error stacktrace: Error: Feature not supported: Method .func of fluent API at nodeapplocation\node_modules\@sap\cds-runtime\lib\cds-rest\cqnToQuery\index.js:21:15 at Array.forEach (<anonymous>) at compile (nodeapplocation\node_modules\@sap\cds-runtime\lib\cds-rest\cqnToQuery\index.js:16:31) at nodeapplocation\node_modules\@sap\cds-runtime\lib\cds-rest\cqnToQuery\index.js:35:23 at Array.map
(<anonymous>) at compileNextExpression (nodeapplocation\node_modules\@sap\cds-runtime\lib\cds-rest\cqnToQuery\index.js:35:11) at nodeapplocation\node_modules\@sap\cds-runtime\lib\cds-rest\cqnToQuery\index.js:19:9 at Array.forEach (<anonymous>) at compile (nodeapplocation\node_modules\@sap\cds-runtime\lib\cds-rest\cqnToQuery\index.js:16:31) at nodeapplocation\node_modules\@sap\cds-runtime\lib\cds-rest\cqnToQuery\index.js:35:23
Also trying to parse, the following command throws different errors, in this set up.
select column from table where column like 'VAL%'
However when running a CAP application, that calls genuine objects residing in a HDB Container, the like works fine.
To me there seems some functionality missing in the cds-rest library, to support like as an operator.
Request clarification before answering.
Hi Steven,
see my blogpost in here:
https://answers.sap.com/questions/13320866/sap-cap-external-service-filter-startswithendswith.html
SO, basically there is the possibility to modify query.SELECT.where properties. I will post my solution soon.
BR
Rufat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
22 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.