Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Eager loading of many-many associations #834
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.