cancel
Showing results for 
Search instead for 
Did you mean: 

Query Limit in CAP

former_member674586
Discoverer
0 Kudos

Hi

I have a application in NodeJS with CAP, but when I make a GET to the entity in .cds file,I only receive 1000 items.

can I remove this limitation for receive all items?

Accepted Solutions (0)

Answers (2)

Answers (2)

david_kunz2
Advisor
Advisor

Hi,

In the next version of @sap/cds (very soon to be released) you can annotate your entity with `@cds.query.limit.max` to set the maximum retrieved items.

Then you can use $top=[something <= @cds.query.limit.max].

Best regards,
David

gregorw
Active Contributor

I would suggest you use $skip and $top. That way you avoid high memory usage on the server side.