This project is archived and is in readonly mode.
:uniq option doesn't work with has_many :through and eager loading
-
Jon Leighton
- Assigned user set to Aaron Patterson
- Tag changed from activerecord, eager_loading, has_many_through, uniq to activerecord, eager_loading, has_many_through, patch, uniq
- Importance changed from to
Here is a patch which fixes this, with tests.
-
Repository
- State changed from new to resolved
(from [09ddca67acbb88e2fdd7300670839cbf647b2694]) Fix problem with duplicated records when a :uniq :through association is preloaded [#2447 :uniq option doesn't work with has_many :through and eager loading state:resolved] https://github.com/rails/rails/commit/09ddca67acbb88e2fdd7300670839...
-
Sean Hussey
I realize this is long-closed, by is there any reason why it wasn't backported to 2.3.x? It was originally reported on the 2.3 branch, but this fix wasn't included in the 2.3.11 release (almost 2 months after this patch was applied).
I've got it handled in my apps now, but it seems like this was lost in the shuffle (reported 4/2009, recategorized 5/2010, patched 12/2010).
-
Jon Leighton
Sean, the 2.3 branch is not having any further releases. If you would like to backport the patch to the 3-0-stable branch then feel free and I will apply it.
