Changes:
* Set config.active_record.timestamped_migrations = false to have
migrations with numeric prefix instead of UTC
timestamp. #446.
* Fixed that create database statements would always include "DEFAULT
NULL" [#334]
* change_column_default preserves the not-null constraint. #617
* Add :tokenizer option to validates_length_of to specify how to split
up the attribute string. #507. Example :
# Ensure essay contains at least 100 words.
validates_length_of :essay, :minimum => 100, :too_short => "Your
essay must be at least %d words."), :tokenizer => lambda {|str|
str.scan(/\w+/) }
* Always treat integer :limit as byte length. #420
* Partial updates don't update lock_version if nothing changed. #426
* Fix column collision with named_scope and :joins. #46
* db:migrate:down and :up update schema_migrations. #369
* PostgreSQL: support :conditions => [':foo::integer', { :foo => 1 }]
without treating the ::integer typecast as a bind variable.
* MySQL: rename_column preserves column defaults. #466
* Add :from option to calculations. #397
* Add :validate option to associations to enable/disable the automatic
validation of associated models. Resolves#301.
* PostgreSQL: use 'INSERT ... RETURNING id' for 8.2 and later.
* Added SQL escaping for :limit and :offset in MySQL
Changes:
* Depend on Action Pack 1.4.4
* Fix #count on a has_many :through association so that it recognizes the
:uniq option. Closes#8801 [lifofifo]
* Don't clobber includes passed to has_many.count [danger]
* Make sure has_many uses :include when counting [danger]
* Save associated records only if the association is already loaded. #8713
* Changing the :default Date format doesn't break date quoting. #6312
* Allow nil serialized attributes with a set class constraint. #7293
* belongs_to assignment creates a new proxy rather than modifying its target
in-place. #8412 [mmangino@elevatedrails.com]
* Fix column type detection while loading fixtures. Closes#7987 [roderickvd]
* Document deep eager includes. #6267 [Josh Susser, Dan Manges]
* Oracle: extract column length for CHAR also. #7866 [ymendel]
* Small additions and fixes for ActiveRecord documentation. Closes#7342
* SQLite: binary escaping works with $KCODE='u'. #7862 [tsuka]
* Improved cloning performance by relying less on exception raising #8159
Changes:
* Pass a range in :conditions to use the SQL BETWEEN operator. #6974
[dcmanges] Student.find(:all, :conditions => { :grade => 9..12 })
* Don't create instance writer methods for class attributes. [Rick]
* When dealing with SQLite3, use the table_info pragma helper, so that the
bindings can do some translation for when sqlite3 breaks incompatibly
between point releases. [Jamis Buck]
* SQLServer: don't choke on strings containing 'null'. #7083 [Jakob S]
* Consistently use LOWER() for uniqueness validations (rather than mixing with
UPPER()) so the database can always use a functional index on the lowercased
column. #6495 [Si]
* MySQL: SET SQL_AUTO_IS_NULL=0 so 'where id is null' doesn't select the last
inserted id. #6778 [Jonathan Viney, timc]
* Fixtures use the table name and connection from set_fixture_class. #7330
[Anthony Eden]
* SQLServer: quote table name in indexes query. #2928 [keithm@infused.org]
Active Record connects business objects and database tables to create
a persistable domain model where logic and data is presented in one
wrapping. It is an implementation of the object-relational mapping
(ORM) pattern by the same name as described by Martin Fowler:
"An object that wraps a row in a database table or view, encapsulates
the database access, and adds domain logic on that data."
Active Records main contribution to the pattern is to relieve the
original of two stunting problems: lack of associations and
inheritance. By adding a simple domain language-like set of macros to
describe the former and integrating the Single Table Inheritance
pattern for the latter, Active Record narrows the gap of functionality
between the data mapper and active record approach.