Error: Only HasMany associations support include.separate
@SippieCup 已经在做这个了。
开始于 2026年3月29日。
评估
这个 Issue 还没有评估数据。
描述
Issue Description
The documentation regarding "Separate eager-loading queries" implies that the separate: true option is a valid solution for BelongsToMany associations, but using it throws an error.
What was unclear/insufficient/not covered in the documentation
In the Separate eager-loading queries section, the text groups HasMany and BelongsToMany together when explaining performance issues with joins.
It immedately follows that up with: "To avoid this, you can use the separate option."
Because they are grouped together in the problem description, it sounds like separate is the solution for both. However, trying this on a BelongsToMany asociation results in: Error: Only HasMany associations support include.separate
The docs currently don't mention that this option is restricted to HasMany only.
If possible: Provide some suggestion on how we can enhance the docs
It would be clearer if we added a note explicitly stating that separate is currently HasMany only, or update the phrasing so BelongsToMany isn't grouped into the sentence introducing the solution.
Additional context
Link to the section: https://sequelize.org/docs/v7/querying/select-in-depth/#separate-eager-loading-queries
- 主要语言
- HTML
- 星标
- 30
- 派生
- 171
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sequelize/website 的其他 Issue
-
docs: Managed Postgres callout + optional Appwrite link on postgres.mdx?可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1-3 小时 新手友好度 74/100
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 55/100
-
难度 1/5 1 小时以内 新手友好度 45/100