ecto
ecto copied to clipboard
Many to many relations fails to preload on Ecto 2.0.0-rc.5
Environment
- Elixir 1.2.3
- Postgres 9.5.1
- Ecto 2.0.0-rc-5
- Postgrex 0.11.1
- Operating system: OS X El Capitan
Current behavior
Ecto fails to preload a many to many association. You can find a repository that demonstrates the issue at https://github.com/lboekhorst/many_to_many. It has two tests, one to assert that a record is added to the join table (passes), and one test that checks if the length of the preloaded list is equal to 1 (fails).
Expected behavior
I would have expected the preload to fetch the associated Rate records.
Fixed in master!
Thanks, working!