This project is archived and is in readonly mode.
Changeset [5cebe69e74d411c3c9e5f6ab9d4b2b16ee36177c] by Frederick Cheung
Revision 5cebe69e74d411c3c9e5f6ab9d4b2b16ee36177c,
committed by Frederick Cheung
· December 26th, 2008 @ 06:25 PM
Preload uses exclusive scope [#643 state:resolved]
With self referential associations, the scope for the the top level should not affect fetching of associations, for example when doing
Person.male.find :all, :include => :friends
we should load all of the friends for each male, not just the male friends. http://github.com/rails/rails/co...
5 changed files
-
M
activerecord/lib/active_record/association_preload.rb -
M
activerecord/test/cases/associations/eager_test.rb -
M
activerecord/test/fixtures/people.yml -
M
activerecord/test/models/person.rb -
M
activerecord/test/schema/schema.rb