-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default scope options override options provided with rest queries #678
Comments
I'm facing the same issue. I feel the default scope doesn't get override. It's kind of a hard limit which will always supershade the values provided by user. Is there any way to override it from a Model.js remote function. |
Ok. I've found out a solution to do it using a operation hook. Hope it will be of your help
|
In fact I think this was not intended and I've just submitted PR #787 to change that :-) |
Nice solution @sachinik19 . Using it now. |
for those interested in @off 's PR, please see my post here |
For an overridable default/max limit you can check out https://github.com/fullcube/loopback-ds-resultset-limit-mixin |
Hi,
First of all thank you guys for the amazing framework. I love it!
I'm not sure if it's an issue or I'm mis-using the libraries. What I want to achieve is a default pagination where a query would limit items by default (as my collection could be really large and I don't want someone accidentally trying to return 5 millions of documents). So, I have specified the scope on a model:
When I query for the items I get the correct number of them in the result (3):
When I add an additional limit filter to the query above, I still get the same 3 items in the result (but I'm expecting 2 only):
Could you please advise if I'm using the package wrongly or it's a bug? Is there a better way of doing a default pagination? Thanks!
The text was updated successfully, but these errors were encountered: