Changeset 7588
- Timestamp:
- 09/22/07 23:51:03 (1 year ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/associations.rb (modified) (1 diff)
- trunk/activerecord/test/associations_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r7577 r7588 1 1 *SVN* 2 3 * Correctly quote id list for limited eager loading. #7482 [tmacedo] 2 4 3 5 * Fixed that using version-targetted migrates would fail on loggers other than the default one #7430 [valeksenko] trunk/activerecord/lib/active_record/associations.rb
r7504 r7588 1257 1257 end 1258 1258 end 1259 1259 1260 1260 def select_limited_ids_list(options, join_dependency) 1261 pk = columns_hash[primary_key] 1262 1261 1263 connection.select_all( 1262 1264 construct_finder_sql_for_association_limiting(options, join_dependency), 1263 1265 "#{name} Load IDs For Limited Eager Loading" 1264 ).collect { |row| connection.quote(row[primary_key] ) }.join(", ")1266 ).collect { |row| connection.quote(row[primary_key], pk) }.join(", ") 1265 1267 end 1266 1268 trunk/activerecord/test/associations_test.rb
r7511 r7588 1847 1847 join_dep = ActiveRecord::Associations::ClassMethods::JoinDependency.new(join_base, :developers, nil) 1848 1848 projects = Project.send(:select_limited_ids_list, {:order => 'developers.created_at'}, join_dep) 1849 assert !projects.include?("'"), projects 1849 1850 assert_equal %w(1 2), projects.scan(/\d/).sort 1850 1851 end