2017-06-11 07:13:21 -04:00
|
|
|
* Fix eager loading/preloading association with scope including joins.
|
|
|
|
|
|
|
|
Fixes #28324.
|
|
|
|
|
|
|
|
*Ryuta Kamizono*
|
|
|
|
|
2017-07-01 14:25:33 -04:00
|
|
|
* Fix transactions to apply state to child transactions
|
|
|
|
|
|
|
|
Previously if you had a nested transaction and the outer transaction was rolledback the record from the
|
|
|
|
inner transaction would still be marked as persisted.
|
|
|
|
|
|
|
|
This change fixes that by applying the state of the parent transaction to the child transaction when the
|
|
|
|
parent transaction is rolledback. This will correctly mark records from the inner transaction as not persisted.
|
|
|
|
|
|
|
|
*Eileen M. Uchitelle*, *Aaron Patterson*
|
|
|
|
|
2017-07-01 14:22:28 -04:00
|
|
|
* Deprecate `set_state` method in `TransactionState`
|
|
|
|
|
|
|
|
Deprecated the `set_state` method in favor of setting the state via specific methods. If you need to mark the
|
|
|
|
state of the transaction you can now use `rollback!`, `commit!` or `nullify!` instead of
|
|
|
|
`set_state(:rolledback)`, `set_state(:committed)`, or `set_state(nil)`.
|
|
|
|
|
|
|
|
*Eileen M. Uchitelle*, *Aaron Patterson*
|
|
|
|
|
2017-05-05 17:02:01 -04:00
|
|
|
* Deprecate delegating to `arel` in `Relation`.
|
|
|
|
|
|
|
|
*Ryuta Kamizono*
|
|
|
|
|
2017-06-28 07:43:13 -04:00
|
|
|
* Fix eager loading to respect `store_full_sti_class` setting.
|
|
|
|
|
|
|
|
*Ryuta Kamizono*
|
|
|
|
|
2017-07-03 10:58:12 -04:00
|
|
|
* Query cache was unavailable when entering the `ActiveRecord::Base.cache` block
|
2017-06-28 01:12:12 -04:00
|
|
|
without being connected.
|
|
|
|
|
|
|
|
*Tsukasa Oishi*
|
|
|
|
|
2017-06-27 11:41:39 -04:00
|
|
|
* Previously, when building records using a `has_many :through` association,
|
|
|
|
if the child records were deleted before the parent was saved, they would
|
|
|
|
still be persisted. Now, if child records are deleted before the parent is saved
|
|
|
|
on a `has_many :through` association, the child records will not be persisted.
|
|
|
|
|
|
|
|
*Tobias Kraze*
|
|
|
|
|
2016-08-17 11:16:36 -04:00
|
|
|
* Merging two relations representing nested joins no longer transforms the joins of
|
|
|
|
the merged relation into LEFT OUTER JOIN. Example to clarify:
|
|
|
|
|
|
|
|
```
|
|
|
|
Author.joins(:posts).merge(Post.joins(:comments))
|
|
|
|
# Before the change:
|
|
|
|
#=> SELECT ... FROM authors INNER JOIN posts ON ... LEFT OUTER JOIN comments ON...
|
|
|
|
|
|
|
|
# After the change:
|
|
|
|
#=> SELECT ... FROM authors INNER JOIN posts ON ... INNER JOIN comments ON...
|
|
|
|
```
|
|
|
|
|
|
|
|
TODO: Add to the Rails 5.2 upgrade guide
|
|
|
|
|
|
|
|
*Maxime Handfield Lapointe*
|
|
|
|
|
2017-04-27 17:23:50 -04:00
|
|
|
* `ActiveRecord::Persistence#touch` does not work well when optimistic locking enabled and
|
|
|
|
`locking_column`, without default value, is null in the database.
|
|
|
|
|
|
|
|
*bogdanvlviv*
|
|
|
|
|
2017-04-29 04:21:05 -04:00
|
|
|
* Fix destroying existing object does not work well when optimistic locking enabled and
|
2017-07-03 10:58:12 -04:00
|
|
|
`locking_column` is null in the database.
|
2017-04-29 04:21:05 -04:00
|
|
|
|
|
|
|
*bogdanvlviv*
|
|
|
|
|
2017-06-18 11:14:52 -04:00
|
|
|
* Use bulk INSERT to insert fixtures for better performance.
|
|
|
|
|
|
|
|
*Kir Shatrov*
|
|
|
|
|
2017-05-10 15:20:53 -04:00
|
|
|
* Prevent making bind param if casted value is nil.
|
|
|
|
|
|
|
|
*Ryuta Kamizono*
|
|
|
|
|
2017-05-28 20:02:45 -04:00
|
|
|
* Deprecate passing arguments and block at the same time to `count` and `sum` in `ActiveRecord::Calculations`.
|
|
|
|
|
|
|
|
*Ryuta Kamizono*
|
|
|
|
|
2017-05-24 19:38:45 -04:00
|
|
|
* Loading model schema from database is now thread-safe.
|
|
|
|
|
|
|
|
Fixes #28589.
|
|
|
|
|
|
|
|
*Vikrant Chaudhary*, *David Abdemoulaie*
|
|
|
|
|
2017-05-18 19:28:15 -04:00
|
|
|
* Add `ActiveRecord::Base#cache_version` to support recyclable cache keys via the new versioned entries
|
|
|
|
in `ActiveSupport::Cache`. This also means that `ActiveRecord::Base#cache_key` will now return a stable key
|
2017-05-18 12:12:32 -04:00
|
|
|
that does not include a timestamp any more.
|
2017-05-18 19:28:15 -04:00
|
|
|
|
|
|
|
NOTE: This feature is turned off by default, and `#cache_key` will still return cache keys with timestamps
|
|
|
|
until you set `ActiveRecord::Base.cache_versioning = true`. That's the setting for all new apps on Rails 5.2+
|
|
|
|
|
2017-05-18 12:12:32 -04:00
|
|
|
*DHH*
|
|
|
|
|
2017-05-18 19:28:15 -04:00
|
|
|
* Respect `SchemaDumper.ignore_tables` in rake tasks for databases structure dump
|
2017-05-15 19:24:33 -04:00
|
|
|
|
|
|
|
*Rusty Geldmacher*, *Guillermo Iguaran*
|
|
|
|
|
2017-05-02 15:37:06 -04:00
|
|
|
* Add type caster to `RuntimeReflection#alias_name`
|
|
|
|
|
|
|
|
Fixes #28959.
|
|
|
|
|
|
|
|
*Jon Moss*
|
|
|
|
|
2017-04-04 22:35:47 -04:00
|
|
|
* Deprecate `supports_statement_cache?`.
|
|
|
|
|
|
|
|
*Ryuta Kamizono*
|
|
|
|
|
2017-04-29 13:41:44 -04:00
|
|
|
* Quote database name in `db:create` grant statement (when database user does not have access to create the database).
|
2017-04-06 08:05:49 -04:00
|
|
|
|
|
|
|
*Rune Philosof*
|
|
|
|
|
2017-02-25 12:32:50 -05:00
|
|
|
* Raise error `UnknownMigrationVersionError` on the movement of migrations
|
|
|
|
when the current migration does not exist.
|
|
|
|
|
|
|
|
*bogdanvlviv*
|
|
|
|
|
2017-02-25 10:49:32 -05:00
|
|
|
* Fix `bin/rails db:forward` first migration.
|
|
|
|
|
|
|
|
*bogdanvlviv*
|
|
|
|
|
2017-04-15 16:17:14 -04:00
|
|
|
* Support Descending Indexes for MySQL.
|
|
|
|
|
|
|
|
MySQL 8.0.1 and higher supports descending indexes: `DESC` in an index definition is no longer ignored.
|
|
|
|
See https://dev.mysql.com/doc/refman/8.0/en/descending-indexes.html.
|
|
|
|
|
|
|
|
*Ryuta Kamizono*
|
|
|
|
|
2017-04-04 13:23:51 -04:00
|
|
|
* Fix inconsistency with changed attributes when overriding AR attribute reader.
|
|
|
|
|
|
|
|
*bogdanvlviv*
|
|
|
|
|
2017-04-06 21:43:58 -04:00
|
|
|
* When calling the dynamic fixture accessor method with no arguments it now returns all fixtures of this type.
|
|
|
|
Previously this method always returned an empty array.
|
|
|
|
|
|
|
|
*Kevin McPhillips*
|
|
|
|
|
|
|
|
|
2017-03-21 19:41:39 -04:00
|
|
|
Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/activerecord/CHANGELOG.md) for previous changes.
|