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

SubQuery parameter is not documented or is not easy to find #620

Open
mattpen opened this issue Oct 30, 2023 · 1 comment
Open

SubQuery parameter is not documented or is not easy to find #620

mattpen opened this issue Oct 30, 2023 · 1 comment

Comments

@mattpen
Copy link

mattpen commented Oct 30, 2023

Issue Description

What was unclear/insufficient/not covered in the documentation

I was having an issue with sequelize rewriting my complicated query with subqueries and it was failing. Specifically, sequelize moved my limit and offset parameters to a subquery, but the left join clause remained outside which caused it to fail. I found a stack overflow solution that said to put subQuery: false in the findOptions, and this fixed my problem. However, I could not find this documented at all on the sequelize website, so I'm concerned I'm using a part of the API that will change without warning.

Subquery search (unhelpful): https://sequelize.org/search/?q=subquery

If possible: Provide some suggestion on how we can enhance the docs

I think this option and how to use it should be mentioned in the Limits and Pagination section:
https://sequelize.org/docs/v6/core-concepts/model-querying-basics/#limits-and-pagination

Additional context

@ephys
Copy link
Member

ephys commented Dec 13, 2023

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