Skip to content

Expand many-to-many docs: examples, why/when, and troubleshooting #652

Description

@developerjamiu

Demand

Kapa "Many-to-Many Relations" cluster — 15 conversations / 13 users.

Problem

06-database/03-relations/03-many-to-many.md shows how to define the junction model, but:

  • No end-to-end "add an entry" example (the most repeated question) — creating and inserting a junction row.
  • No troubleshooting for the errors users actually hit ("no named relation 'x'", "no getter personId", !persist scope errors), or an explanation of the auto-generated foreign-key field names.
  • It shows how to do a many-to-many relation, but not why or when you need one.

Review feedback: the current examples are the bare minimum. We should do an oversight pass on whether to add more examples covering common many-to-many use cases.

Scope

  • "Managing junction records" section: create + insertRow a junction row, and the attach/attachRow path (cross-link 07-relation-queries.md).
  • "Common errors" subsection: auto-generated FK field names, matching name= on both sides, field scopes.
  • Add why / when to reach for a many-to-many relation.
  • Oversight pass: add examples for common use cases.

Note

The why/when explanation may be better owned by a guide once the Phase 2 guides/reference split lands — keep that split in mind so this does not get duplicated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationp1Priority 1

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions