on 2025 Feb 07 3:11 PM
Hello everyone,
I'm using CAP(Node.js) with odata(v4) & fiori elements. I'm trying to use CQN subqueries and execute them at service level i.e. using srv.run(query) , srv here is a service object created by cds.connect.to('ServiceName'). According to Capire documentation you can use a query as source in the from property : https://cap.cloud.sap/docs/cds/cqn#from
This works but only when you run the query using cds.run(query). My requirement is to execute the query in other services i.e. srv.run(). But when i try doing that it gives the following error : [cds] - TypeError: Cannot read properties of undefined (reading 'map')
And when you click on the file( resolveView.js i.e. an internal file) that the error is referring to, it shows the following code , error is on line 653:
Seems like it expects an object with ref property as key and an array as value i.e from = {ref : ['TableName']}, and works only if the source is a table & not another query. Is this the default behavior and is there any way around it ?
Request clarification before answering.
User | Count |
---|---|
58 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.