mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
2d6088ced5
Applying `includes` and `joins` to a relation that selected additional database fields would cause those additional fields not to be included in the results even though they were queried from the database: posts = Post.select('1 as other').includes(:tbl).joins(:tbl) posts.to_sql.include?('1 as other') #=> true posts.first.attributes.include?('other') #=> false This commit includes these additionally selected fields in the instantiated results. |
||
---|---|---|
.. | ||
delegation_test.rb | ||
delete_all_test.rb | ||
merging_test.rb | ||
mutation_test.rb | ||
or_test.rb | ||
predicate_builder_test.rb | ||
record_fetch_warning_test.rb | ||
select_test.rb | ||
update_all_test.rb | ||
where_chain_test.rb | ||
where_clause_test.rb | ||
where_test.rb |