Permalink
Browse files

Fixed incompatibility with Base#find with an array of ids that would …

…fail when using eager loading #1186 [Alisdair McDiarmid]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1259 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
dhh committed Apr 30, 2005
1 parent 9f1b577 commit 787951348bd498ef16e0c2f24aa677499bc6b1ef
Showing with 3 additions and 1 deletion.
  1. +2 −0 activerecord/CHANGELOG
  2. +1 −1 activerecord/lib/active_record/base.rb
View
@@ -1,5 +1,7 @@
*SVN*
+* Fixed incompatibility with Base#find with an array of ids that would fail when using eager loading #1186 [Alisdair McDiarmid]
+
* Fixed that validate_length_of lost :on option when :within was specified #1195 [jhosteny@mac.com]
* Added encoding and min_messages options for PostgreSQL #1205 [shugo]. Configuration example:
@@ -349,7 +349,7 @@ def find(*args)
else
# Find multiple ids
ids_list = ids.map { |id| sanitize(id) }.join(',')
- result = find(:all, options.merge({ :conditions => "#{table_name}.#{primary_key} IN (#{ids_list})#{conditions}", :order => primary_key }))
+ result = find(:all, options.merge({ :conditions => "#{table_name}.#{primary_key} IN (#{ids_list})#{conditions}"}))
if result.size == ids.size
return result
else

0 comments on commit 7879513

Please sign in to comment.