Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Error: Only HasMany associations support include.separate

Đang mở
#824 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@SippieCup đang làm issue này rồi.

Từ ngày 29/3/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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

Ngôn ngữ chính
HTML
Star
30
Fork
172
Merge trung bình
30 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của sequelize/website

Tất cả issue của sequelize/website

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.