Skip to content
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

Querying model: filter by related model properties #1754

Closed
ddddm opened this issue Oct 21, 2015 · 1 comment
Closed

Querying model: filter by related model properties #1754

ddddm opened this issue Oct 21, 2015 · 1 comment

Comments

@ddddm
Copy link

ddddm commented Oct 21, 2015

Hello. Please help me to understand loopback principles.

For example, i have a "User" model with oneToMany relation to "Photo" model with "status" property (string). My goal is to query only "User" which have "Photo"s with status == "active". As i understand from docs i can query "User" model and include "Photo"s there, specifiying "where" field for "Photo" model, but that's not my goal. Instead i want filter "User" based on their "Photo"s statuses. Is it possible with loopback?

@ddddm
Copy link
Author

ddddm commented Oct 21, 2015

Found an answer to my question in this issue: #517
Its not implemented yet. However, @DiogoDoreto made a fork to loopback-mysql-adapter which might help.
#517 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants