We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, Is there any way to filter on association column?
Sequelize equivalent:
Project.findAll({ include: [{ model: Task, where: {"name":"myTask"} }] })
this is what I want to query:
http://localhost/project?task.name=myTask
The text was updated successfully, but these errors were encountered:
I am interested in doing this too. I am wondering if there would be a place that we could inject the logic to handle this?
Thanks, Douglas
Sorry, something went wrong.
Something like that
Project.use({ list: { fetch: { before(request, response, context) { if (!isEmpty(request.query) && request.query.name) { context.include = [{ model: Task, attributes: [ 'name' ], where: { name: request.query.name }, }]; } return context.continue; }, }, }, });
No branches or pull requests
Hi, Is there any way to filter on association column?
Sequelize equivalent:
this is what I want to query:
The text was updated successfully, but these errors were encountered: