New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eager loading of many-many associations #834

Merged
merged 7 commits into from Aug 17, 2013

Conversation

2 participants
@lemon-tree
Contributor

lemon-tree commented Aug 14, 2013

These commits add support for eager loading of many-many associations through a junctionTable on all three dialects, which is achieved by performing the expected two joins. See the new test code for an example, it's essentially the same as any other include.

It doesn't have support for non-standard named primary keys, but that should be possible with a couple of tweaks. There's also probably some cleaning up to be done, but that can be sorted before merging and once some others have confirmed it is a viable solution.

Also, this fixes a bug whereby only one many-many association direction had the foreignIdentifier property defined properly. Now both directions have the correct properties.

@sdepold

This comment has been minimized.

Member

sdepold commented Aug 17, 2013

fucking awesome !

@sdepold sdepold merged commit f2bcc28 into sequelize:master Aug 17, 2013

1 check passed

default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment