diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-05-23 14:16:52 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-05-23 14:16:52 +0000 |
commit | 0b41d088dc1e6c84c3b8ff9f38368198e824bc87 (patch) | |
tree | 55d9b80764754371b39e3bc7aea7087d70e23100 | |
parent | 9bfcfa8d8f0e4bb76766d6329a3bbc4a697bec59 (diff) | |
download | rails-0b41d088dc1e6c84c3b8ff9f38368198e824bc87.tar.gz rails-0b41d088dc1e6c84c3b8ff9f38368198e824bc87.tar.bz2 rails-0b41d088dc1e6c84c3b8ff9f38368198e824bc87.zip |
Add a quick note about :select and eagerly included associations. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4363 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index c501af6f44..76762fc3e4 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Add a quick note about :select and eagerly included associations. [Rick] + * Add docs for the :as option in has_one associations. Closes #5144 [cdcarter@gmail.com] * Fixed that has_many collections shouldn't load the entire association to do build or create [DHH] diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 3d207aab61..ad28407e57 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -348,7 +348,8 @@ module ActiveRecord # # Also have in mind that since the eager loading is pulling from multiple tables, you'll have to disambiguate any column references # in both conditions and orders. So :order => "posts.id DESC" will work while :order => "id DESC" will not. This may require that - # you alter the :order and :conditions on the association definitions themselves. + # you alter the :order and :conditions on the association definitions themselves. Because eager loading generates the SELECT statement too, + # the :select option is ignored. # # It's currently not possible to use eager loading on multiple associations from the same table. Eager loading will not pull # additional attributes on join tables, so "rich associations" with has_and_belongs_to_many is not a good fit for eager loading. |