Skip to content

Question - why do hasMany relationships require a separate join table? #53

@nicholasf

Description

@nicholasf

Hi,

I'm just coming up to speed with ORM2. Great work so far!

I'm curious why you chose to implement hasMany by relying on a third join table between the associated models? In Downstairs (the ORM I created but probably won't continue) I assumed that if a Foo hasMany Bars, then the Bar table would have a foreign key called foo_id.

https://github.com/nicholasf/downstairs.js/blob/master/lib/collection.js#L127

Cheers,
Nicholas

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions