Skip to content

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

Open
@mattpen

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions