on 01-16-2021 5:56 AM
Hello ,
We are facing an issue where every service defined in CAP (Nodejs module) returns the result set in sorted order of primary key by default . We want to remove this and provide our own custom sorting . However writing an order by statement after entity select is not causing any change to the output result set and is still sorted by primary key .
From cap documentation i have read that there is some implicit sorting mechanism involved here . In JAVA runtime we can remove the implicit sorting by adding cds.query.implicitSorting.enabled: false in some config file . (https://cap.cloud.sap/docs/java/development/properties) . How do we achieve the same in NodeJS environment? Please provide the full syntax if possible as i tried adding the same as a nested structure in package.json and it didnt work .
Regards,
Akshat Malhotra
Hi,
Check this documentation about implicit sorting:
https://cap.cloud.sap/docs/guides/generic#implicit-sorting
The key is always the default sort order, but if you specify other orders yourself, they have a higher priority.
BR
Samuel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good day, sambr
what should I do if a key of an external service defined by edmx/cds is annotated by sap:sortable="false"
I have a read-only access to this service (SuccessFactors sandbox)
so I'm receiving an error error.Error during request to remote service:
[COE0003]Bad property expression: backgroundElementId; backgroundElementId is not sortableUser | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.