1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib
Sean Griffin a45363a2fb Always prefer class types to query types when casting group
When `group` is used in combination with any calculation method, the
resulting hash uses the grouping expression as the key. Currently we're
incorrectly always favoring the type reported by the query, instead of
the type known by the class. This causes differing behavior depending on
whether the adaptor actually gives proper types with the query or not.
After this change, the behavior will be the same on all adaptors -- we
see if we know the type from the class, fall back to the type from the
query, and finally fall back to the identity type.

Fixes #25595
2016-07-11 10:57:37 -04:00
..
active_record Always prefer class types to query types when casting group 2016-07-11 10:57:37 -04:00
rails/generators Generate application_record.rb file before model file 2016-06-08 08:52:12 +02:00
active_record.rb Publish AS::Executor and AS::Reloader APIs 2016-03-02 02:14:20 +10:30