diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2016-02-01 14:03:12 -0700 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2016-02-01 14:03:12 -0700 |
commit | 0cbcae59dd402ff27f6dbf76659b67a77776fe37 (patch) | |
tree | 545374b2b06bf49113bae2cab0a34a7d0a609c9b /activerecord/CHANGELOG.md | |
parent | f8167acc41d514847e07a305262481db6a149dd6 (diff) | |
download | rails-0cbcae59dd402ff27f6dbf76659b67a77776fe37.tar.gz rails-0cbcae59dd402ff27f6dbf76659b67a77776fe37.tar.bz2 rails-0cbcae59dd402ff27f6dbf76659b67a77776fe37.zip |
Revert "Merge pull request #16400 from bogdan/last-with-sql"
This reverts commit 9f3730a516f30beb0050caea9539f8d6b808e58a, reversing
changes made to 2637fb75d82e1c69333855abd58c2470994995d3.
There are additional issues with this commit that need to be addressed
before this change is ready (see #23377). This is a temporary revert in
order for us to have more time to address the issues with that PR,
without blocking the release of beta2.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index faab0f9554..50a0b291b3 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,23 +1,3 @@ -* Rework `ActiveRecord::Relation#last` - - 1. Always find last with ruby if relation is loaded - 2. Always use SQL instead if relation is not loaded. - 3. Deprecated relation loading when SQL order can not be automatically reversed - - Topic.order("title").load.last(3) - # before: SELECT ... - # after: No SQL - - Topic.order("title").last - # before: SELECT * FROM `topics` - # after: SELECT * FROM `topics` ORDER BY `topics`.`title` DESC LIMIT 1 - - Topic.order("coalesce(author, title)").last - # before: SELECT * FROM `topics` - # after: Deprecation Warning for irreversible order - - *Bogdan Gusiev* - * `ActiveRecord::Relation#reverse_order` throws `ActiveRecord::IrreversibleOrderError` when the order can not be reversed using current trivial algorithm. Also raises the same error when `#reverse_order` is called on |