1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Disable identity map when loading associated records from habtm.

This commit is contained in:
Emilio Tagua 2010-09-13 14:58:22 -03:00
parent dd6e680815
commit fa11c60b44

View file

@ -199,8 +199,10 @@ module ActiveRecord
select("#{options[:select] || table_name+'.*'}, t0.#{reflection.primary_key_name} as the_parent_record_id").
order(options[:order])
all_associated_records = associated_records(ids) do |some_ids|
associated_records_proxy.where([conditions, ids]).to_a
all_associated_records = ActiveRecord::IdentityMap.without do
associated_records(ids) do |some_ids|
associated_records_proxy.where([conditions, ids]).to_a
end
end
set_association_collection_records(id_to_record_map, reflection.name, all_associated_records, 'the_parent_record_id')