From 144e8691cbfb8bba77f18cfe68d5e7fd48887f5e Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Fri, 28 Sep 2012 17:55:35 +0100 Subject: Support for partial inserts. When inserting new records, only the fields which have been changed from the defaults will actually be included in the INSERT statement. The other fields will be populated by the database. This is more efficient, and also means that it will be safe to remove database columns without getting subsequent errors in running app processes (so long as the code in those processes doesn't contain any references to the removed column). --- activerecord/CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index d52d6a7fde..b6ad6f82d8 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,5 +1,18 @@ ## Rails 4.0.0 (unreleased) ## +* Support for partial inserts. + + When inserting new records, only the fields which have been changed + from the defaults will actually be included in the INSERT statement. + The other fields will be populated by the database. + + This is more efficient, and also means that it will be safe to + remove database columns without getting subsequent errors in running + app processes (so long as the code in those processes doesn't + contain any references to the removed column). + + *Jon Leighton* + * Added `#update_columns` method which updates the attributes from the passed-in hash without calling save, hence skipping validations and callbacks. `ActiveRecordError` will be raised when called on new objects -- cgit v1.2.3