mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
stop creating intermediate AR objects, just construct AR objects from a list of hashes
This commit is contained in:
@@ -188,7 +188,8 @@ module ActiveRecord
|
||||
def find_with_associations
|
||||
including = (@eager_load_values + @includes_values).uniq
|
||||
join_dependency = ActiveRecord::Associations::ClassMethods::JoinDependency.new(@klass, including, [])
|
||||
rows = construct_relation_for_association_find(join_dependency).to_a
|
||||
relation = construct_relation_for_association_find(join_dependency)
|
||||
rows = connection.exec_query(relation.to_sql, 'SQL', relation.bind_values)
|
||||
join_dependency.instantiate(rows)
|
||||
rescue ThrowResult
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user