-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Include filter hasMany but exclude if relation empty #4995
Comments
@fikarisasi , at the moment we don't support the filter you have specified above. Please read https://loopback.io/doc/en/lb4/HasMany-relation.html#querying-related-models to view the queries we do support. In the meantime, as a workaround, in the controller method, you can always analyze the result returned from the repository, strip out the data you don't want (result objects without |
Loosely-related #4299 |
@emonddr any idea how to strip out the data with the correct limit filter? I already tried to strip out the data but it doesn't return the correct limit filter. For example, if I limit the data to 10, and result objects with |
Any updates? |
@emonddr If you try to filter data by related models and use limit it does not work properly.
|
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
I have a /customers controller and get their data using this filter:
the result is:
I want the result that excluding Rachel because she doesn't have demands, I tried this but the result is still the same:
any idea how can I achieve this?
The text was updated successfully, but these errors were encountered: