aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/preloader/through_association.rb
Commit message (Collapse)AuthorAgeFilesLines
* don't shadow `through_scope` method name with local var.Yves Senn2013-06-301-7/+7
|
* don't apply invalid ordering when preloading hmt associations.Yves Senn2013-02-241-2/+2
| | | | | | | | | | | | | | | closes #8663. When preloading a hmt association there two possible scenarios: 1.) preload with 2 queries: first hm association, then hmt with id IN () 2.) preload with join: hmt association is loaded with a join on the hm association The bug was happening in scenario 1.) with a normal order clause on the hmt association. The ordering was also applied when loading the hm association, which resulted in the error. This patch only applies the ordering the the hm-relation if we are performing a join (2). Otherwise the order will only appear in the second query (1).
* don't cache invalid subsets when preloading hmt associations.Yves Senn2013-02-141-1/+2
| | | | closes #8423.
* Represent association scope options as AR::Relations insternally.Jon Leighton2012-07-131-16/+11
|
* Revert "Deprecate implicit eager loading. Closes #950."Jon Leighton2012-01-161-1/+0
| | | | This reverts commit c99d507fccca2e9e4d12e49b4387e007c5481ae9.
* Deprecate implicit eager loading. Closes #950.Jon Leighton2011-12-291-0/+1
|
* Stop identity-mapping the through records in the preloader since I fixed the ↵Jon Leighton2011-03-041-5/+0
| | | | underlying problem in the habtm preloader.
* Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-041-0/+5
|\
* | Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-041-2/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/class_methods/join_dependency.rb activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb activerecord/lib/active_record/associations/has_many_association.rb activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/lib/active_record/associations/has_one_association.rb activerecord/lib/active_record/associations/has_one_through_association.rb activerecord/lib/active_record/associations/through_association_scope.rb activerecord/lib/active_record/reflection.rb activerecord/test/cases/associations/has_many_through_associations_test.rb activerecord/test/cases/associations/has_one_through_associations_test.rb activerecord/test/cases/reflection_test.rb activerecord/test/cases/relations_test.rb activerecord/test/fixtures/memberships.yml activerecord/test/models/categorization.rb activerecord/test/models/category.rb activerecord/test/models/member.rb activerecord/test/models/reference.rb activerecord/test/models/tagging.rb
* Rewrote AssociationPreload.Jon Leighton2011-02-281-0/+66