Skip to content

feat: Cyclical relationship within a collection #392

@jaredcwhite

Description

@jaredcwhite

I haven't specifically proved this, but I believe we have a gap in our current relations logic: what if I want a collection to "belongs_to" and also "has_many" itself? This would be useful in documentation where Page A could reference Page B and C and pages B and C could know about the back-reference from Page A.

Probably need to add a "belongs_to_with_references" or "belongs_to_self" or something to that nature. (It could be "has_and_belongs_to_many" but that sounds too much like a difference concept within Rails DB associations.)

I thought of this because I want to add "See Also" sections within our own documentation, and this feature would be the perfect fit. ☺️

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions