diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-04 23:33:10 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-04 23:33:10 +0000 |
commit | 55854c4195177d2d5cbf0497c77e63b24cb76074 (patch) | |
tree | 7fc8154d16a0fef79b20fab53d3c2070307b23ee /activerecord/CHANGELOG | |
parent | 30caefdfc794b8b828a50663dc0b933431273092 (diff) | |
download | rails-55854c4195177d2d5cbf0497c77e63b24cb76074.tar.gz rails-55854c4195177d2d5cbf0497c77e63b24cb76074.tar.bz2 rails-55854c4195177d2d5cbf0497c77e63b24cb76074.zip |
Added cascading eager loading that allows for queries like Author.find(:all, :include=> { :posts=> :comments }), which will fetch all authors, their posts, and the comments belonging to those posts in a single query (using LEFT OUTER JOIN) #3913 [anna@wota.jp]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3769 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r-- | activerecord/CHANGELOG | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 0dccedcf1f..95544950e9 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,34 @@ *SVN* +* Added cascading eager loading that allows for queries like Author.find(:all, :include=> { :posts=> :comments }), which will fetch all authors, their posts, and the comments belonging to those posts in a single query (using LEFT OUTER JOIN) #3913 [anna@wota.jp]. Examples: + + # cascaded in two levels + >> Author.find(:all, :include=>{:posts=>:comments}) + => authors + +- posts + +- comments + + # cascaded in two levels and normal association + >> Author.find(:all, :include=>[{:posts=>:comments}, :categorizations]) + => authors + +- posts + +- comments + +- categorizations + + # cascaded in two levels with two has_many associations + >> Author.find(:all, :include=>{:posts=>[:comments, :categorizations]}) + => authors + +- posts + +- comments + +- categorizations + + # cascaded in three levels + >> Company.find(:all, :include=>{:groups=>{:members=>{:favorites}}}) + => companies + +- groups + +- members + +- favorites + * Make counter cache work when replacing an association #3245 [eugenol@gmail.com] * Make migrations verbose [Jamis Buck] |