Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Error: Only HasMany associations support include.separate

未关闭
#824 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@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,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

sequelize/website 的其他 Issue

查看 sequelize/website 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。