diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-01-21 14:33:16 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-01-21 14:41:52 -0200 |
commit | b0a8ef140e4cc95fa5d3888699fd3d72fd720172 (patch) | |
tree | 36e75ffa27dcd74dc0d08382098a552df53fab6d /activerecord/lib/rails | |
parent | e011258c30b61f30e40fb2d9b2f58eb1f700dfd5 (diff) | |
download | rails-b0a8ef140e4cc95fa5d3888699fd3d72fd720172.tar.gz rails-b0a8ef140e4cc95fa5d3888699fd3d72fd720172.tar.bz2 rails-b0a8ef140e4cc95fa5d3888699fd3d72fd720172.zip |
`has_one` and `belongs_to` accessors don't add ORDER BY to the queries anymore.
Since Rails 4.0, we add an ORDER BY in the `first` method to ensure consistent
results among different database engines. But for singular associations this
behavior is not needed since we will have one record to return. As this
ORDER BY option can lead some performance issues we are removing it for singular
associations accessors.
Fixes #12623.
Diffstat (limited to 'activerecord/lib/rails')
0 files changed, 0 insertions, 0 deletions