This project is archived and is in readonly mode.
[PATCH] Join conditions removed on habtm and has many through with conditions or STI
Reported by David Genord II | February 17th, 2010 @ 04:38 PM
When utilizing a JoinDependency to load a habtm or has many through association that uses conditions and/or an STI target class that is not the base class, at least the join condition is lost producing incorrect results.
I have provided a patch that is split into 2 commits. The first commit alters the posts.yml and comments.yml fixtures and fixes the tests theses changes break. The second commit presents a new failing test case and the fix.
Comments and changes to this ticket
-
David Genord II February 24th, 2010 @ 10:15 PM
- Tag changed from activerecord associations, 3.0pre, activerecord, rails3 to activerecord associations, 3.0pre, activerecord, patch, rails3
-
David Genord II May 27th, 2010 @ 05:25 PM
Yes it is still an issue but the patch is going to change drastically. I should have it ready shortly.
-
Rohit Arondekar October 7th, 2010 @ 05:21 AM
- Tag changed from activerecord associations, 3.0pre, activerecord, patch, rails3 to 3.0pre, activerecord, associations, patch, rails3
-
Jon Leighton December 20th, 2010 @ 04:00 PM
- Assigned user set to Aaron Patterson
This is no longer an issue and so it can be closed.
I've run both of David's tests and they work. It's already covered by
test_eager_with_has_many_through_join_model_with_conditions_on_top_level
ineager_test.rb
. -
Jon Leighton December 20th, 2010 @ 07:49 PM
- State changed from new to resolved
- Importance changed from to Low
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>