Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

root/branches/1-2-stable/activerecord/CHANGELOG

Revision 8195, 150.3 kB (checked in by nzkoz, 1 year ago)

Prepare for 1.2.6

Line 
1 *1.15.6* (November 24th, 2007)
2
3 * Allow association redefinition in subclasses.  #9346 [wildchild]
4
5 * Fix has_many :through delete with custom foreign keys.  #6466 [naffis]
6
7 * Fix regression where the association would not construct new finder SQL on save causing bogus queries for "WHERE owner_id = NULL" even after owner was saved.  #8713 [Bryan Helmkamp]
8
9
10 *1.15.5* (October 12th, 2007)
11
12 * Depend on Action Pack 1.4.4
13
14
15 *1.15.4* (October 4th, 2007)
16
17 * Fix #count on a has_many :through association so that it recognizes the :uniq option. Closes #8801 [lifofifo]
18
19 * Don't clobber includes passed to has_many.count [danger]
20
21 * Make sure has_many uses :include when counting [danger]
22
23 * Save associated records only if the association is already loaded.  #8713 [blaine]
24
25 * Changing the :default Date format doesn't break date quoting.  #6312 [bshand, Elias]
26
27 * Allow nil serialized attributes with a set class constraint. #7293 [sandofsky]
28
29 * belongs_to assignment creates a new proxy rather than modifying its target in-place.  #8412 [mmangino@elevatedrails.com]
30
31 * Fix column type detection while loading fixtures.  Closes #7987 [roderickvd]
32
33 * Document deep eager includes.  #6267 [Josh Susser, Dan Manges]
34
35 * Oracle: extract column length for CHAR also.  #7866 [ymendel]
36
37 * Small additions and fixes for ActiveRecord documentation.  Closes #7342 [jeremymcanally]
38
39 * SQLite: binary escaping works with $KCODE='u'.  #7862 [tsuka]
40
41 * Improved cloning performance by relying less on exception raising #8159 [Blaine]
42
43
44 *1.15.3* (March 12th, 2007)
45
46 * Allow a polymorphic :source for has_many :through associations. Closes #7143 [protocool]
47
48 * Consistently quote primary key column names.  #7763 [toolmantim]
49
50 * Fixtures: fix YAML ordered map support.  #2665 [Manuel Holtgrewe, nfbuckley]
51
52 * Fix has_many :through << with custom foreign keys.  #6466, #7153 [naffis, Rich Collins]
53
54
55 *1.15.2* (February 5th, 2007)
56
57 * Pass a range in :conditions to use the SQL BETWEEN operator.  #6974 [dcmanges]
58     Student.find(:all, :conditions => { :grade => 9..12 })
59
60 * Don't create instance writer methods for class attributes. [Rick]
61
62 * 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]
63
64 * SQLServer: don't choke on strings containing 'null'.  #7083 [Jakob S]
65
66 * 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]
67
68 * MySQL: SET SQL_AUTO_IS_NULL=0 so 'where id is null' doesn't select the last inserted id.  #6778 [Jonathan Viney, timc]
69
70 * Fixtures use the table name and connection from set_fixture_class.  #7330 [Anthony Eden]
71
72 * SQLServer: quote table name in indexes query.  #2928 [keithm@infused.org]
73
74
75 *1.15.1* (January 17th, 2007)
76
77 * Fix nodoc breaking of adapters
78
79
80 *1.15.0* (January 16th, 2007)
81
82 * [DOC] clear up some ambiguity with the way has_and_belongs_to_many creates the default join table name.  #7072 [jeremymcanally]
83
84 * change_column accepts :default => nil. Skip column options for primary keys.  #6956, #7048 [dcmanges, Jeremy Kemper]
85
86 * MySQL, PostgreSQL: change_column_default quotes the default value and doesn't lose column type information.  #3987, #6664 [Jonathan Viney, manfred, altano@bigfoot.com]
87
88 * Oracle: create_table takes a :sequence_name option to override the 'tablename_seq' default.  #7000 [Michael Schoen]
89
90 * MySQL: retain SSL settings on reconnect.  #6976 [randyv2]
91
92 * SQLServer: handle [quoted] table names.  #6635 [rrich]
93
94 * acts_as_nested_set works with single-table inheritance.  #6030 [Josh Susser]
95
96 * PostgreSQL, Oracle: correctly perform eager finds with :limit and :order.  #4668, #7021 [eventualbuddha, Michael Schoen]
97
98 * Fix the Oracle adapter for serialized attributes stored in CLOBs.  Closes #6825 [mschoen, tdfowler]
99
100 * [DOCS] Apply more documentation for ActiveRecord Reflection.  Closes #4055 [Robby Russell]
101
102 * [DOCS] Document :allow_nil option of #validate_uniqueness_of. Closes #3143 [Caio Chassot]
103
104 * Bring the sybase adapter up to scratch for 1.2 release. [jsheets]
105
106 * Oracle: fix connection reset failure.  #6846 [leonlleslie]
107
108 * Subclass instantiation doesn't try to explicitly require the corresponding subclass.  #6840 [leei, Jeremy Kemper]
109
110 * fix faulty inheritance tests and that eager loading grabs the wrong inheritance column when the class of your association is an STI subclass. Closes #6859 [protocool]
111
112 * find supports :lock with :include. Check whether your database allows SELECT ... FOR UPDATE with outer joins before using.  #6764 [vitaly, Jeremy Kemper]
113
114 * Support nil and Array in :conditions => { attr => value } hashes.  #6548 [Assaf, Jeremy Kemper]
115     find(:all, :conditions => { :topic_id => [1, 2, 3], :last_read => nil }
116
117 * Quote ActiveSupport::Multibyte::Chars.  #6653 [Julian Tarkhanov]
118
119 * MySQL: detect when a NOT NULL column without a default value is misreported as default ''.  Can't detect for string, text, and binary columns since '' is a legitimate default.  #6156 [simon@redhillconsulting.com.au, obrie, Jonathan Viney, Jeremy Kemper]
120
121 * validates_numericality_of uses \A \Z to ensure the entire string matches rather than ^ $ which may match one valid line of a multiline string.  #5716 [Andreas Schwarz]
122
123 * Oracle: automatically detect the primary key.  #6594 [vesaria, Michael Schoen]
124
125 * Oracle: to increase performance, prefetch 100 rows and enable similar cursor sharing. Both are configurable in database.yml.  #6607 [philbogle@gmail.com, ray.fortna@jobster.com, Michael Schoen]
126
127 * Firebird: decimal/numeric support.  #6408 [macrnic]
128
129 * Find with :include respects scoped :order.  #5850
130
131 * Dynamically generate reader methods for serialized attributes.  #6362 [Stefan Kaes]
132
133 * Deprecation: object transactions warning.  [Jeremy Kemper]
134
135 * has_one :dependent => :nullify ignores nil associates.  #6528 [janovetz, Jeremy Kemper]
136
137 * Oracle: resolve test failures, use prefetched primary key for inserts, check for null defaults, fix limited id selection for eager loading. Factor out some common methods from all adapters.  #6515 [Michael Schoen]
138
139 * Make add_column use the options hash with the Sqlite Adapter. Closes #6464 [obrie]
140
141 * Document other options available to migration's add_column. #6419 [grg]
142
143 * MySQL: all_hashes compatibility with old MysqlRes class.  #6429, #6601 [Jeremy Kemper]
144
145 * Fix has_many :through to add the appropriate conditions when going through an association using STI. Closes #5783. [Jonathan Viney]
146
147 * fix select_limited_ids_list issues in postgresql, retain current behavior in other adapters [Rick]
148
149 * Restore eager condition interpolation, document it's differences [Rick]
150
151 * Don't rollback in teardown unless a transaction was started. Don't start a transaction in create_fixtures if a transaction is started.  #6282 [Jacob Fugal, Jeremy Kemper]
152
153 * Add #delete support to has_many :through associations.  Closes #6049 [Martin Landers]
154
155 * Reverted old select_limited_ids_list postgresql fix that caused issues in mysql.  Closes #5851 [Rick]
156
157 * Removes the ability for eager loaded conditions to be interpolated, since there is no model instance to use as a context for interpolation. #5553 [turnip@turnipspatch.com]
158
159 * Added timeout option to SQLite3 configurations to deal more gracefully with SQLite3::BusyException, now the connection can instead retry for x seconds to see if the db clears up before throwing that exception #6126 [wreese@gmail.com]
160
161 * Added update_attributes! which uses save! to raise an exception if a validation error prevents saving #6192 [jonathan]
162
163 * Deprecated add_on_boundary_breaking (use validates_length_of instead) #6292 [BobSilva]
164
165 * The has_many create method works with polymorphic associations.  #6361 [Dan Peterson]
166
167 * MySQL: introduce Mysql::Result#all_hashes to support further optimization.  #5581 [Stefan Kaes]
168
169 * save! shouldn't validate twice.  #6324 [maiha, Bob Silva]
170
171 * Association collections have an _ids reader method to match the existing writer for collection_select convenience (e.g. employee.task_ids). The writer method skips blank ids so you can safely do @employee.task_ids = params[:tasks] without checking every time for an empty list or blank values.  #1887, #5780 [Michael Schuerig]
172
173 * Add an attribute reader method for ActiveRecord::Base.observers [Rick Olson]
174
175 * Deprecation: count class method should be called with an options hash rather than two args for conditions and joins.  #6287 [Bob Silva]
176
177 * has_one associations with a nil target may be safely marshaled.  #6279 [norbauer, Jeremy Kemper]
178
179 * Duplicate the hash provided to AR::Base#to_xml to prevent unexpected side effects [Koz]
180
181 * Add a :namespace option to  AR::Base#to_xml [Koz]
182
183 * Deprecation tests. Remove warnings for dynamic finders and for the foo_count method if it's also an attribute. [Jeremy Kemper]
184
185 * Mock Time.now for more accurate Touch mixin tests.  #6213 [Dan Peterson]
186
187 * Improve yaml fixtures error reporting.  #6205 [Bruce Williams]
188
189 * Rename AR::Base#quote so people can use that name in their models. #3628 [Koz]
190
191 * Add deprecation warning for inferred foreign key. #6029 [Josh Susser]
192
193 * Fixed the Ruby/MySQL adapter we ship with Active Record to work with the new authentication handshake that was introduced in MySQL 4.1, along with the other protocol changes made at that time #5723 [jimw@mysql.com]
194
195 * Deprecation: use :dependent => :delete_all rather than :exclusively_dependent => true.  #6024 [Josh Susser]
196
197 * Optimistic locking: gracefully handle nil versions, treat as zero.  #5908 [Tom Ward]
198
199 * to_xml: the :methods option works on arrays of records.  #5845 [Josh Starcher]
200
201 * has_many :through conditions are sanitized by the associating class.  #5971 [martin.emde@gmail.com]
202
203 * Fix spurious newlines and spaces in AR::Base#to_xml output [Jamis Buck]
204
205 * has_one supports the :dependent => :delete option which skips the typical callback chain and deletes the associated object directly from the database.  #5927 [Chris Mear, Jonathan Viney]
206
207 * Nested subclasses are not prefixed with the parent class' table_name since they should always use the base class' table_name.  #5911 [Jonathan Viney]
208
209 * SQLServer: work around bug where some unambiguous date formats are not correctly identified if the session language is set to german.  #5894 [Tom Ward, kruth@bfpi]
210
211 * Clashing type columns due to a sloppy join shouldn't wreck single-table inheritance.  #5838 [Kevin Clark]
212
213 * Fixtures: correct escaping of \n and \r.  #5859 [evgeny.zislis@gmail.com]
214
215 * Migrations: gracefully handle missing migration files.  #5857 [eli.gordon@gmail.com]
216
217 * MySQL: update test schema for MySQL 5 strict mode.  #5861 [Tom Ward]
218
219 * to_xml: correct naming of included associations.  #5831 [josh.starcher@gmail.com]
220
221 * Pushing a record onto a has_many :through sets the association's foreign key to the associate's primary key and adds it to the correct association.  #5815, #5829 [josh@hasmanythrough.com]
222
223 * Add records to has_many :through using <<, push, and concat by creating the association record. Raise if base or associate are new records since both ids are required to create the association. #build raises since you can't associate an unsaved record. #create! takes an attributes hash and creates the associated record and its association in a transaction. [Jeremy Kemper]
224
225     # Create a tagging to associate the post and tag.
226     post.tags << Tag.find_by_name('old')
227     post.tags.create! :name => 'general'
228
229     # Would have been:
230     post.taggings.create!(:tag => Tag.find_by_name('finally')
231     transaction do
232       post.taggings.create!(:tag => Tag.create!(:name => 'general'))
233     end
234
235 * Cache nil results for :included has_one associations also.  #5787 [Michael Schoen]
236
237 * Fixed a bug which would cause .save to fail after trying to access a empty has_one association on a unsaved record. [Tobias Luetke]
238
239 * Nested classes are given table names prefixed by the singular form of the parent's table name. [Jeremy Kemper]
240     Example: Invoice::Lineitem is given table name invoice_lineitems
241
242 * Migrations: uniquely name multicolumn indexes so you don't have to. [Jeremy Kemper]
243     # people_active_last_name_index, people_active_deactivated_at_index
244     add_index    :people, [:active, :last_name]
245     add_index    :people, [:active, :deactivated_at]
246     remove_index :people, [:active, :last_name]
247     remove_index :people, [:active, :deactivated_at]
248
249   WARNING: backward-incompatibility. Multicolumn indexes created before this
250   revision were named using the first column name only. Now they're uniquely
251   named using all indexed columns.
252
253   To remove an old multicolumn index, remove_index :table_name, :first_column
254
255 * Fix for deep includes on the same association. [richcollins@gmail.com]
256
257 * Tweak fixtures so they don't try to use a non-ActiveRecord class.  [Kevin Clark]
258
259 * Remove ActiveRecord::Base.reset since Dispatcher doesn't use it anymore.  [Rick Olson]
260
261 * PostgreSQL: autodetected sequences work correctly with multiple schemas. Rely on the schema search_path instead of explicitly qualifying the sequence name with its schema.  #5280 [guy.naor@famundo.com]
262
263 * Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar]
264
265 * Cache nil results for has_one associations so multiple calls don't call the database.  Closes #5757. [Michael A. Schoen]
266
267 * Don't save has_one associations unnecessarily.  #5735 [Jonathan Viney]
268
269 * Refactor ActiveRecord::Base.reset_subclasses to #reset, and add global observer resetting.  [Rick Olson]
270
271 * Formally deprecate the deprecated finders. [Koz]
272
273 * Formally deprecate rich associations.  [Koz]
274
275 * Fixed that default timezones for new / initialize should uphold utc setting #5709 [daniluk@yahoo.com]
276
277 * Fix announcement of very long migration names.  #5722 [blake@near-time.com]
278
279 * The exists? class method should treat a string argument as an id rather than as conditions.  #5698 [jeremy@planetargon.com]
280
281 * Fixed to_xml with :include misbehaviors when invoked on array of model instances #5690 [alexkwolfe@gmail.com]
282
283 * Added support for conditions on Base.exists? #5689 [josh@joshpeek.com]. Examples:
284
285     assert (Topic.exists?(:author_name => "David"))
286           assert (Topic.exists?(:author_name => "Mary", :approved => true))
287           assert (Topic.exists?(["parent_id = ?", 1]))
288
289 * Schema dumper quotes date :default values. [Dave Thomas]
290
291 * Calculate sum with SQL, not Enumerable on HasManyThrough Associations. [Dan Peterson]
292
293 * Factor the attribute#{suffix} methods out of method_missing for easier extension. [Jeremy Kemper]
294
295 * Patch sql injection vulnerability when using integer or float columns. [Jamis Buck]
296
297 * Allow #count through a has_many association to accept :include.  [Dan Peterson]
298
299 * create_table rdoc: suggest :id => false for habtm join tables. [Zed Shaw]
300
301 * PostgreSQL: return array fields as strings. #4664 [Robby Russell]
302
303 * SQLServer: added tests to ensure all database statements are closed, refactored identity_insert management code to use blocks, removed update/delete rowcount code out of execute and into update/delete, changed insert to go through execute method, removed unused quoting methods, disabled pessimistic locking tests as feature is currently unsupported, fixed RakeFile to load sqlserver specific tests whether running in ado or odbc mode, fixed support for recently added decimal types, added support for limits on integer types. #5670 [Tom Ward]
304
305 * SQLServer: fix db:schema:dump case-sensitivity. #4684 [Will Rogers]
306
307 * Oracle: BigDecimal support. #5667 [schoenm@earthlink.net]
308
309 * Numeric and decimal columns map to BigDecimal instead of Float. Those with scale 0 map to Integer. #5454 [robbat2@gentoo.org, work@ashleymoran.me.uk]
310
311 * Firebird migrations support. #5337 [Ken Kunz <kennethkunz@gmail.com>]
312
313 * PostgreSQL: create/drop as postgres user. #4790 [mail@matthewpainter.co.uk, mlaster@metavillage.com]
314
315 * PostgreSQL: correctly quote the ' in pk_and_sequence_for. #5462 [tietew@tietew.net]
316
317 * PostgreSQL: correctly quote microseconds in timestamps. #5641 [rick@rickbradley.com]
318
319 * Clearer has_one/belongs_to model names (account has_one :user). #5632 [matt@mattmargolis.net]
320
321 * Oracle: use nonblocking queries if allow_concurrency is set, fix pessimistic locking, don't guess date vs. time by default (set OracleAdapter.emulate_dates = true for the old behavior), adapter cleanup. #5635 [schoenm@earthlink.net]
322
323 * Fixed a few Oracle issues: Allows Oracle's odd date handling to still work consistently within #to_xml, Passes test that hardcode insert statement by dropping the :id column, Updated RUNNING_UNIT_TESTS with Oracle instructions, Corrects method signature for #exec #5294 [schoenm@earthlink.net]
324
325 * Added :group to available options for finds done on associations #5516 [mike@michaeldewey.org]
326
327 * Observers also watch subclasses created after they are declared. #5535 [daniels@pronto.com.au]
328
329 * Removed deprecated timestamps_gmt class methods. [Jeremy Kemper]
330
331 * rake build_mysql_database grants permissions to rails@localhost. #5501 [brianegge@yahoo.com]
332
333 * PostgreSQL: support microsecond time resolution. #5492 [alex@msgpad.com]
334
335 * Add AssociationCollection#sum since the method_missing invokation has been shadowed by Enumerable#sum.
336
337 * Added find_or_initialize_by_X which works like find_or_create_by_X but doesn't save the newly instantiated record. [Sam Stephenson]
338
339 * Row locking. Provide a locking clause with the :lock finder option or true for the default "FOR UPDATE". Use the #lock! method to obtain a row lock on a single record (reloads the record with :lock => true). [Shugo Maeda]
340     # Obtain an exclusive lock on person 1 so we can safely increment visits.
341     Person.transaction do
342       # select * from people where id=1 for update
343       person = Person.find(1, :lock => true)
344       person.visits += 1
345       person.save!
346     end
347
348 * PostgreSQL: introduce allow_concurrency option which determines whether to use blocking or asynchronous #execute. Adapters with blocking #execute will deadlock Ruby threads. The default value is ActiveRecord::Base.allow_concurrency. [Jeremy Kemper]
349
350 * Use a per-thread (rather than global) transaction mutex so you may execute concurrent transactions on separate connections. [Jeremy Kemper]
351
352 * Change AR::Base#to_param to return a String instead of a Fixnum. Closes #5320. [Nicholas Seckar]
353
354 * Use explicit delegation instead of method aliasing for AR::Base.to_param -> AR::Base.id. #5299 (skaes@web.de)
355
356 * Refactored ActiveRecord::Base.to_xml to become a delegate for XmlSerializer, which restores sanity to the mega method. This refactoring also reinstates the opinions that type="string" is redundant and ugly and nil-differentiation is not a concern of serialization [DHH]
357
358 * Added simple hash conditions to find that'll just convert hash to an AND-based condition string #5143 [hcatlin@gmail.com]. Example:
359
360     Person.find(:all, :conditions => { :last_name => "Catlin", :status => 1 }, :limit => 2)
361
362 ...is the same as:
363
364     Person.find(:all, :conditions => [ "last_name = ? and status = ?", "Catlin", 1 ], :limit => 2)
365  
366   This makes it easier to pass in the options from a form or otherwise outside.
367    
368
369 * Fixed issues with BLOB limits, charsets, and booleans for Firebird #5194, #5191, #5189 [kennethkunz@gmail.com]
370
371 * Fixed usage of :limit and with_scope when the association in scope is a 1:m #5208 [alex@purefiction.net]
372
373 * Fixed migration trouble with SQLite when NOT NULL is used in the new definition #5215 [greg@lapcominc.com]
374
375 * Fixed problems with eager loading and counting on SQL Server #5212 [kajism@yahoo.com]
376
377 * Fixed that count distinct should use the selected column even when using :include #5251 [anna@wota.jp]
378
379 * Fixed that :includes merged from with_scope won't cause the same association to be loaded more than once if repetition occurs in the clauses #5253 [alex@purefiction.net]
380
381 * Allow models to override to_xml.  #4989 [Blair Zajac <blair@orcaware.com>]
382
383 * PostgreSQL: don't ignore port when host is nil since it's often used to label the domain socket.  #5247 [shimbo@is.naist.jp]
384
385 * Records and arrays of records are bound as quoted ids. [Jeremy Kemper]
386     Foo.find(:all, :conditions => ['bar_id IN (?)', bars])
387     Foo.find(:first, :conditions => ['bar_id = ?', bar])
388
389 * Fixed that Base.find :all, :conditions => [ "id IN (?)", collection ] would fail if collection was empty [DHH]
390
391 * Add a list of regexes assert_queries skips in the ActiveRecord test suite.  [Rick]
392
393 * Fix the has_and_belongs_to_many #create doesn't populate the join for new records.  Closes #3692 [josh@hasmanythrough.com]
394
395 * Provide Association Extensions access to the instance that the association is being accessed from. 
396   Closes #4433 [josh@hasmanythrough.com]
397
398 * Update OpenBase adaterp's maintainer's email address. Closes #5176. [Derrick Spell]
399
400 * Add a quick note about :select and eagerly included associations. [Rick]
401
402 * Add docs for the :as option in has_one associations.  Closes #5144 [cdcarter@gmail.com]
403
404 * Fixed that has_many collections shouldn't load the entire association to do build or create [DHH]
405
406 * Added :allow_nil option for aggregations #5091 [ian.w.white@gmail.com]
407
408 * Fix Oracle boolean support and tests. Closes #5139. [schoenm@earthlink.net]
409
410 * create! no longer blows up when no attributes are passed and a :create scope is in effect (e.g. foo.bars.create! failed whereas foo.bars.create!({}) didn't.) [Jeremy Kemper]
411
412 * Call Inflector#demodulize on the class name when eagerly including an STI model.  Closes #5077 [info@loobmedia.com]
413
414 * Preserve MySQL boolean column defaults when changing a column in a migration. Closes #5015. [pdcawley@bofh.org.uk]
415
416 * PostgreSQL: migrations support :limit with :integer columns by mapping limit < 4 to smallint, > 4 to bigint, and anything else to integer. #2900 [keegan@thebasement.org]
417
418 * Dates and times interpret empty strings as nil rather than 2000-01-01. #4830 [kajism@yahoo.com]
419
420 * Allow :uniq => true with has_many :through associations. [Jeremy Kemper]
421
422 * Ensure that StringIO is always available for the Schema dumper. [Marcel Molina Jr.]
423
424 * Allow AR::Base#to_xml to include methods too. Closes #4921. [johan@textdrive.com]
425
426 * Remove duplicate fixture entry in comments.yml. Closes #4923. [Blair Zajac <blair@orcaware.com>]
427
428 * When grouping, use the appropriate option key. [Marcel Molina Jr.]
429
430 * Add support for FrontBase (http://www.frontbase.com/) with a new adapter thanks to the hard work of one Mike Laster. Closes #4093. [mlaster@metavillage.com]
431
432 * Add warning about the proper way to validate the presence of a foreign key. Closes #4147. [Francois Beausoleil <francois.beausoleil@gmail.com>]
433
434 * Fix syntax error in documentation. Closes #4679. [mislav@nippur.irb.hr]
435
436 * Add Oracle support for CLOB inserts. Closes #4748. [schoenm@earthlink.net sandra.metz@duke.edu]
437
438 * Various fixes for sqlserver_adapter (odbc statement finishing, ado schema dumper, drop index). Closes #4831. [kajism@yahoo.com]
439
440 * Add support for :order option to with_scope. Closes #3887. [eric.daspet@survol.net]
441
442 * Prettify output of schema_dumper by making things line up. Closes #4241 [Caio  Chassot <caio@v2studio.com>]
443
444 * Make build_postgresql_databases task make databases owned by the postgres user. Closes #4790. [mlaster@metavillage.com]
445
446 * Sybase Adapter type conversion cleanup. Closes #4736. [dev@metacasa.net]
447
448 * Fix bug where calculations with long alias names return null. [Rick]
449
450 * Raise error when trying to add to a has_many :through association.  Use the Join Model instead. [Rick]
451
452     @post.tags << @tag                  # BAD
453     @post.taggings.create(:tag => @tag) # GOOD
454
455 * Allow all calculations to take the :include option, not just COUNT (closes #4840) [Rick]
456
457 * Add ActiveRecord::Errors#to_xml [Jamis Buck]
458
459 * Properly quote index names in migrations (closes #4764) [John Long]
460
461 * Fix the HasManyAssociation#count method so it uses the new ActiveRecord::Base#count syntax, while maintaining backwards compatibility.  [Rick]
462
463 * Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick]
464
465 * Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick]
466
467 * Add :case_sensitive option to validates_uniqueness_of (closes #3090) [Rick]
468
469     class Account < ActiveRecord::Base
470       validates_uniqueness_of :email, :case_sensitive => false
471     end
472
473 * Allow multiple association extensions with :extend option (closes #4666) [Josh Susser]
474
475     class Account < ActiveRecord::Base
476       has_many :people, :extend => [FindOrCreateByNameExtension, FindRecentExtension]
477     end
478
479
480 *1.14.4* (August 8th, 2006)
481
482 * Add warning about the proper way to validate the presence of a foreign key.  #4147 [Francois Beausoleil <francois.beausoleil@gmail.com>]
483
484 * Fix syntax error in documentation. #4679 [mislav@nippur.irb.hr]
485
486 * Update inconsistent migrations documentation. #4683 [machomagna@gmail.com]
487
488
489 *1.14.3* (June 27th, 2006)
490
491 * Fix announcement of very long migration names.  #5722 [blake@near-time.com]
492
493 * Update callbacks documentation. #3970 [Robby Russell <robby@planetargon.com>]
494
495 * Properly quote index names in migrations (closes #4764) [John Long]
496
497 * Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick]
498
499 * Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick]
500
501
502 *1.14.2* (April 9th, 2006)
503
504 * Fixed calculations for the Oracle Adapter (closes #4626) [Michael Schoen]
505
506
507 *1.14.1* (April 6th, 2006)
508
509 * Fix type_name_with_module to handle type names that begin with '::'. Closes #4614. [Nicholas Seckar]
510
511 * Fixed that that multiparameter assignment doesn't work with aggregations (closes #4620) [Lars Pind]
512
513 * Enable Limit/Offset in Calculations (closes #4558) [lmarlow@yahoo.com]
514
515 * Fixed that loading including associations returns all results if Load IDs For Limited Eager Loading returns none (closes #4528) [Rick]
516
517 * Fixed HasManyAssociation#find bugs when :finder_sql is set #4600 [lagroue@free.fr]
518
519 * Allow AR::Base#respond_to? to behave when @attributes is nil [zenspider]
520
521 * Support eager includes when going through a polymorphic has_many association. [Rick]
522
523 * Added support for eagerly including polymorphic has_one associations. (closes #4525) [Rick]
524
525     class Post < ActiveRecord::Base
526       has_one :tagging, :as => :taggable
527     end
528    
529     Post.find :all, :include => :tagging
530
531 * Added descriptive error messages for invalid has_many :through associations: going through :has_one or :has_and_belongs_to_many [Rick]
532
533 * Added support for going through a polymorphic has_many association: (closes #4401) [Rick]
534
535     class PhotoCollection < ActiveRecord::Base
536       has_many :photos, :as => :photographic
537       belongs_to :firm
538     end
539      
540     class Firm < ActiveRecord::Base
541       has_many :photo_collections
542       has_many :photos, :through => :photo_collections
543     end
544
545 * Multiple fixes and optimizations in PostgreSQL adapter, allowing ruby-postgres gem to work properly. [ruben.nine@gmail.com]
546
547 * Fixed that AssociationCollection#delete_all should work even if the records of the association are not loaded yet. [Florian Weber]
548
549 * Changed those private ActiveRecord methods to take optional third argument :auto instead of nil for performance optimizations.  (closes #4456) [Stefan]
550
551 * Private ActiveRecord methods add_limit!, add_joins!, and add_conditions! take an OPTIONAL third argument 'scope' (closes #4456) [Rick]
552
553 * DEPRECATED: Using additional attributes on has_and_belongs_to_many associations. Instead upgrade your association to be a real join model [DHH]
554
555 * Fixed that records returned from has_and_belongs_to_many associations with additional attributes should be marked as read only (fixes #4512) [DHH]
556
557 * Do not implicitly mark recordss of has_many :through as readonly but do mark habtm records as readonly (eventually only on join tables without rich attributes). [Marcel Mollina Jr.]
558
559 * Fixed broken OCIAdapter #4457 [schoenm@earthlink.net]
560
561
562 *1.14.0* (March 27th, 2006)
563
564 * Replace 'rescue Object' with a finer grained rescue. Closes #4431. [Nicholas Seckar]
565
566 * Fixed eager loading so that an aliased table cannot clash with a has_and_belongs_to_many join table [Rick]
567
568 * Add support for :include to with_scope [andrew@redlinesoftware.com]
569
570 * Support the use of public synonyms with the Oracle adapter; required ruby-oci8 v0.1.14 #4390 [schoenm@earthlink.net]
571
572 * Change periods (.) in table aliases to _'s.  Closes #4251 [jeff@ministrycentered.com]
573
574 * Changed has_and_belongs_to_many join to INNER JOIN for Mysql 3.23.x.  Closes #4348 [Rick]
575
576 * Fixed issue that kept :select options from being scoped [Rick]
577
578 * Fixed db_schema_import when binary types are present #3101 [DHH]
579
580 * Fixed that MySQL enums should always be returned as strings #3501 [DHH]
581
582 * Change has_many :through to use the :source option to specify the source association.  :class_name is now ignored. [Rick Olson]
583
584     class Connection < ActiveRecord::Base
585       belongs_to :user
586       belongs_to :channel
587     end
588
589     class Channel < ActiveRecord::Base
590       has_many :connections
591       has_many :contacts, :through => :connections, :class_name => 'User' # OLD
592       has_many :contacts, :through => :connections, :source => :user      # NEW
593     end
594
595 * Fixed DB2 adapter so nullable columns will be determines correctly now and quotes from column default values will be removed #4350 [contact@maik-schmidt.de]
596
597 * Allow overriding of find parameters in scoped has_many :through calls [Rick Olson]
598
599   In this example, :include => false disables the default eager association from loading.  :select changes the standard
600   select clause.  :joins specifies a join that is added to the end of the has_many :through query.
601  
602     class Post < ActiveRecord::Base
603       has_many :tags, :through => :taggings, :include => :tagging do
604         def add_joins_and_select
605           find :all, :select => 'tags.*, authors.id as author_id', :include => false,
606             :joins => 'left outer join posts on taggings.taggable_id = posts.id left outer join authors on posts.author_id = authors.id'
607         end
608       end
609     end
610    
611 * Fixed that schema changes while the database was open would break any connections to a SQLite database (now we reconnect if that error is throw) [DHH]
612
613 * Don't classify the has_one class when eager loading, it is already singular. Add tests. (closes #4117) [jonathan@bluewire.net.nz]
614
615 * Quit ignoring default :include options in has_many :through calls [Mark James]
616
617 * Allow has_many :through associations to find the source association by setting a custom class (closes #4307) [jonathan@bluewire.net.nz]
618
619 * Eager Loading support added for has_many :through => :has_many associations (see below).  [Rick Olson]
620
621 * Allow has_many :through to work on has_many associations (closes #3864) [sco@scottraymond.net]  Example:
622
623     class Firm < ActiveRecord::Base
624       has_many :clients
625       has_many :invoices, :through => :clients
626     end
627  
628     class Client < ActiveRecord::Base
629       belongs_to :firm
630       has_many   :invoices
631     end
632  
633     class Invoice < ActiveRecord::Base
634       belongs_to :client
635     end
636
637 * Raise error when trying to select many polymorphic objects with has_many :through or :include (closes #4226) [josh@hasmanythrough.com]
638
639 * Fixed has_many :through to include :conditions set on the :through association. closes #4020 [jonathan@bluewire.net.nz]
640
641 * Fix that has_many :through honors the foreign key set by the belongs_to association in the join model (closes #4259) [andylien@gmail.com / Rick]
642
643 * SQL Server adapter gets some love #4298 [rtomayko@gmail.com]
644
645 * Added OpenBase database adapter that builds on top of the http://www.spice-of-life.net/ruby-openbase/ driver. All functionality except LIMIT/OFFSET is supported #3528 [derrickspell@cdmplus.com]
646
647 * Rework table aliasing to account for truncated table aliases.  Add smarter table aliasing when doing eager loading of STI associations. This allows you to use the association name in the order/where clause. [Jonathan Viney / Rick Olson] #4108 Example (SpecialComment is using STI):
648
649     Author.find(:all, :include => { :posts => :special_comments }, :order => 'special_comments.body')
650
651 * Add AbstractAdapter#table_alias_for to create table aliases according to the rules of the current adapter. [Rick]
652
653 * Provide access to the underlying database connection through Adapter#raw_connection. Enables the use of db-specific methods without complicating the adapters. #2090 [Koz]
654
655 * Remove broken attempts at handling columns with a default of 'now()' in the postgresql adapter. #2257 [Koz]
656
657 * Added connection#current_database that'll return of the current database (only works in MySQL, SQL Server, and Oracle so far -- please help implement for the rest of the adapters) #3663 [Tom ward]
658
659 * Fixed that Migration#execute would have the table name prefix appended to its query #4110 [mark.imbriaco@pobox.com]
660
661 * Make all tinyint(1) variants act like boolean in mysql (tinyint(1) unsigned, etc.) [Jamis Buck]
662
663 * Use association's :conditions when eager loading. [jeremyevans0@gmail.com] #4144
664
665 * Alias the has_and_belongs_to_many join table on eager includes. #4106 [jeremyevans0@gmail.com]
666
667   This statement would normally error because the projects_developers table is joined twice, and therefore joined_on would be ambiguous.
668
669     Developer.find(:all, :include => {:projects => :developers}, :conditions => 'join_project_developers.joined_on IS NOT NULL')
670
671 * Oracle adapter gets some love #4230 [schoenm@earthlink.net]
672
673     * Changes :text to CLOB rather than BLOB [Moses Hohman]
674     * Fixes an issue with nil numeric length/scales (several)
675     * Implements support for XMLTYPE columns [wilig / Kubo Takehiro]
676     * Tweaks a unit test to get it all green again
677     * Adds support for #current_database
678
679 * Added Base.abstract_class? that marks which classes are not part of the Active Record hierarchy #3704 [Rick Olson]
680
681     class CachedModel < ActiveRecord::Base
682       self.abstract_class = true
683     end
684    
685     class Post < CachedModel
686     end
687    
688     CachedModel.abstract_class?
689     => true
690    
691     Post.abstract_class?
692     => false
693
694     Post.base_class
695     => Post
696    
697     Post.table_name
698     => 'posts'
699
700 * Allow :dependent options to be used with polymorphic joins. #3820 [Rick Olson]
701
702     class Foo < ActiveRecord::Base
703       has_many :attachments, :as => :attachable, :dependent => :delete_all
704     end
705
706 * Nicer error message on has_many :through when :through reflection can not be found. #4042 [court3nay@gmail.com]
707
708 * Upgrade to Transaction::Simple 1.3 [Jamis Buck]
709
710 * Catch FixtureClassNotFound when using instantiated fixtures on a fixture that has no ActiveRecord model [Rick Olson]
711
712 * Allow ordering of calculated results and/or grouped fields in calculations [solo@gatelys.com]
713
714 * Make ActiveRecord::Base#save! return true instead of nil on success.  #4173 [johan@johansorensen.com]
715
716 * Dynamically set allow_concurrency.  #4044 [Stefan Kaes]
717
718 * Added Base#to_xml that'll turn the current record into a XML representation [DHH]. Example:
719
720     topic.to_xml
721  
722   ...returns:
723  
724     <?xml version="1.0" encoding="UTF-8"?>
725     <topic>
726       <title>The First Topic</title>
727       <author-name>David</author-name>
728       <id type="integer">1</id>
729       <approved type="boolean">false</approved>
730       <replies-count type="integer">0</replies-count>
731       <bonus-time type="datetime">2000-01-01 08:28:00</bonus-time>
732       <written-on type="datetime">2003-07-16 09:28:00</written-on>
733       <content>Have a nice day</content>
734       <author-email-address>david@loudthinking.com</author-email-address>
735       <parent-id></parent-id>
736       <last-read type="date">2004-04-15</last-read>
737     </topic>
738  
739   ...and you can configure with:
740  
741     topic.to_xml(:skip_instruct => true, :except => [ :id, bonus_time, :written_on, replies_count ])
742  
743   ...that'll return:
744  
745     <topic>
746       <title>The First Topic</title>
747       <author-name>David</author-name>
748       <approved type="boolean">false</approved>
749       <content>Have a nice day</content>
750       <author-email-address>david@loudthinking.com</author-email-address>
751       <parent-id></parent-id>
752       <last-read type="date">2004-04-15</last-read>
753     </topic>
754  
755   You can even do load first-level associations as part of the document:
756  
757     firm.to_xml :include => [ :account, :clients ]
758  
759   ...that'll return something like:
760  
761     <?xml version="1.0" encoding="UTF-8"?>
762     <firm>
763       <id type="integer">1</id>
764       <rating type="integer">1</rating>
765       <name>37signals</name>
766       <clients>
767         <client>
768           <rating type="integer">1</rating>
769           <name>Summit</name>
770         </client>
771         <client>
772           <rating type="integer">1</rating>
773           <name>Microsoft</name>
774         </client>
775       </clients>
776       <account>
777         <id type="integer">1</id>
778         <credit-limit type="integer">50</credit-limit>
779       </account>
780     </firm> 
781
782 * Allow :counter_cache to take a column name for custom counter cache columns [Jamis Buck]
783
784 * Documentation fixes for :dependent [robby@planetargon.com]
785
786 * Stop the MySQL adapter crashing when views are present. #3782 [Jonathan Viney]
787
788 * Don't classify the belongs_to class, it is already singular #4117 [keithm@infused.org]
789
790 * Allow set_fixture_class to take Classes instead of strings for a class in a module.  Raise FixtureClassNotFound if a fixture can't load.  [Rick Olson]
791
792 * Fix quoting of inheritance column for STI eager loading #4098 [Jonathan Viney <jonathan@bluewire.net.nz>]
793
794 * Added smarter table aliasing for eager associations for multiple self joins #3580 [Rick Olson]
795
796     * The first time a table is referenced in a join, no alias is used.
797     * After that, the parent class name and the reflection name are used.
798    
799         Tree.find(:all, :include => :children) # LEFT OUTER JOIN trees AS tree_children ...
800    
801     * Any additional join references get a numerical suffix like '_2', '_3', etc.
802
803 * Fixed eager loading problems with single-table inheritance #3580 [Rick Olson]. Post.find(:all, :include => :special_comments) now returns all posts, and any special comments that the posts may have. And made STI work with has_many :through and polymorphic belongs_to.
804
805 * Added cascading eager loading that allows for queries like Author.find(:all, :include=> { :posts=> :comments }), which will fetch all authors, their posts, and the comments belonging to those posts in a single query (using LEFT OUTER JOIN) #3913 [anna@wota.jp]. Examples:
806
807     # cascaded in two levels
808     >> Author.find(:all, :include=>{:posts=>:comments})
809     => authors
810          +- posts
811               +- comments
812    
813     # cascaded in two levels and normal association
814     >> Author.find(:all, :include=>[{:posts=>:comments}, :categorizations])
815     => authors
816          +- posts
817               +- comments
818          +- categorizations
819    
820     # cascaded in two levels with two has_many associations
821     >> Author.find(:all, :include=>{:posts=>[:comments, :categorizations]})
822     => authors
823          +- posts
824               +- comments
825               +- categorizations
826    
827     # cascaded in three levels
828     >> Company.find(:all, :include=>{:groups=>{:members=>{:favorites}}})
829     => companies
830          +- groups
831               +- members
832                    +- favorites
833    
834 * Make counter cache work when replacing an association #3245 [eugenol@gmail.com]
835
836 * Make migrations verbose [Jamis Buck]
837
838 * Make counter_cache work with polymorphic belongs_to [Jamis Buck]
839
840 * Fixed that calling HasOneProxy#build_model repeatedly would cause saving to happen #4058 [anna@wota.jp]
841
842 * Added Sybase database adapter that relies on the Sybase Open Client bindings (see http://raa.ruby-lang.org/project/sybase-ctlib) #3765 [John Sheets]. It's almost completely Active Record compliant (including migrations), but has the following caveats:
843
844     * Does not support DATE SQL column types; use DATETIME instead.
845     * Date columns on HABTM join tables are returned as String, not Time.
846     * Insertions are potentially broken for :polymorphic join tables
847     * BLOB column access not yet fully supported
848
849 * Clear stale, cached connections left behind by defunct threads. [Jeremy Kemper]
850
851 * CHANGED DEFAULT: set ActiveRecord::Base.allow_concurrency to false.  Most AR usage is in single-threaded applications. [Jeremy Kemper]
852
853 * Renamed the "oci" adapter to "oracle", but kept the old name as an alias #4017 [schoenm@earthlink.net]
854
855 * Fixed that Base.save should always return false if the save didn't succeed, including if it has halted by before_save's #1861, #2477 [DHH]
856
857 * Speed up class -> connection caching and stale connection verification.  #3979 [Stefan Kaes]
858
859 * Add set_fixture_class to allow the use of table name accessors with models which use set_table_name. [Kevin Clark]
860
861 * Added that fixtures to placed in subdirectories of the main fixture files are also loaded #3937 [dblack@wobblini.net]
862
863 * Define attribute query methods to avoid method_missing calls. #3677 [jonathan@bluewire.net.nz]
864
865 * ActiveRecord::Base.remove_connection explicitly closes database connections and doesn't corrupt the connection cache. Introducing the disconnect! instance method for the PostgreSQL, MySQL, and SQL Server adapters; implementations for the others are welcome.  #3591 [Simon Stapleton, Tom Ward]
866
867 * Added support for nested scopes #3407 [anna@wota.jp]. Examples:
868
869     Developer.with_scope(:find => { :conditions => "salary > 10000", :limit => 10 }) do
870       Developer.find(:all)     # => SELECT * FROM developers WHERE (salary > 10000) LIMIT 10
871
872       # inner rule is used. (all previous parameters are ignored)
873       Developer.with_exclusive_scope(:find => { :conditions => "name = 'Jamis'" }) do
874         Developer.find(:all)   # => SELECT * FROM developers WHERE (name = 'Jamis')
875       end
876
877       # parameters are merged
878       Developer.with_scope(:find => { :conditions => "name = 'Jamis'" }) do
879         Developer.find(:all)   # => SELECT * FROM developers WHERE (( salary > 10000 ) AND ( name = 'Jamis' )) LIMIT 10
880       end
881     end
882
883 * Fixed db2 connection with empty user_name and auth options #3622 [phurley@gmail.com]
884
885 * Fixed validates_length_of to work on UTF-8 strings by using characters instead of bytes #3699 [Masao Mutoh]
886
887 * Fixed that reflections would bleed across class boundaries in single-table inheritance setups #3796 [lars@pind.com]
888
889 * Added calculations: Base.count, Base.average, Base.sum, Base.minimum, Base.maxmium, and the generic Base.calculate. All can be used with :group and :having. Calculations and statitics need no longer require custom SQL. #3958 [Rick Olson]. Examples:
890
891     Person.average :age
892     Person.minimum :age
893     Person.maximum :age
894     Person.sum :salary, :group => :last_name
895
896 * Renamed Errors#count to Errors#size but kept an alias for the old name (and included an alias for length too) #3920 [contact@lukeredpath.co.uk]
897
898 * Reflections don't attempt to resolve module nesting of association classes. Simplify type computation. [Jeremy Kemper]
899
900 * Improved the Oracle OCI Adapter with better performance for column reflection (from #3210), fixes to migrations (from #3476 and #3742), tweaks to unit tests (from #3610), and improved documentation (from #2446) #3879 [Aggregated by schoenm@earthlink.net]
901
902 * Fixed that the schema_info table used by ActiveRecord::Schema.define should respect table pre- and suffixes #3834 [rubyonrails@atyp.de]
903
904 * Added :select option to Base.count that'll allow you to select something else than * to be counted on. Especially important for count queries using DISTINCT #3839 [skaes]
905
906 * Correct syntax error in mysql DDL,  and make AAACreateTablesTest run first [Bob Silva]
907
908 * Allow :include to be used with has_many :through associations #3611 [Michael Schoen]
909
910 * PostgreSQL: smarter schema dumps using pk_and_sequence_for(table).  #2920 [Blair Zajac]
911
912 * SQLServer: more compatible limit/offset emulation.  #3779 [Tom Ward]
913
914 * Polymorphic join support for has_one associations (has_one :foo, :as => :bar)  #3785 [Rick Olson]
915
916 * PostgreSQL: correctly parse negative integer column defaults.  #3776 [bellis@deepthought.org]
917
918 * Fix problems with count when used with :include [Jeremy Hopple and Kevin Clark]
919
920 * ActiveRecord::RecordInvalid now states which validations failed in its default error message [Tobias Luetke]
921
922 * Using AssociationCollection#build with arrays of hashes should call build, not create [DHH]
923
924 * Remove definition of reloadable? from ActiveRecord::Base to make way for new Reloadable code. [Nicholas Seckar]
925
926 * Fixed schema handling for DB2 adapter that didn't work: an initial schema could be set, but it wasn't used when getting tables and indexes #3678 [Maik Schmidt]
927
928 * Support the :column option for remove_index with the PostgreSQL adapter. #3661 [shugo@ruby-lang.org]
929
930 * Add documentation for add_index and remove_index. #3600 [Manfred Stienstra <m.stienstra@fngtps.com>]
931
932 * If the OCI library is not available, raise an exception indicating as much. #3593 [schoenm@earthlink.net]
933
934 * Add explicit :order in finder tests as postgresql orders results differently by default. #3577. [Rick Olson]
935
936 * Make dynamic finders honor additional passed in :conditions. #3569 [Oleg Pudeyev <pudeyo@rpi.edu>, Marcel Molina Jr.]
937
938 * Show a meaningful error when the DB2 adapter cannot be loaded due to missing dependencies. [Nicholas Seckar]
939
940 * Make .count work for has_many associations with multi line finder sql [schoenm@earthlink.net]
941
942 * Add AR::Base.base_class for querying the ancestor AR::Base subclass [Jamis Buck]
943
944 * Allow configuration of the column used for optimistic locking [wilsonb@gmail.com]
945
946 * Don't hardcode 'id' in acts as list.  [ror@philippeapril.com]
947
948 * Fix date errors for SQLServer in association tests. #3406 [kevin.clark@gmal.com]
949
950 * Escape database name in MySQL adapter when creating and dropping databases. #3409 [anna@wota.jp]
951
952 * Disambiguate table names for columns in validates_uniquness_of's WHERE clause. #3423 [alex.borovsky@gmail.com]
953
954 * .with_scope imposed create parameters now bypass attr_protected [Tobias Luetke]
955
956 * Don't raise an exception when there are more keys than there are named bind variables when sanitizing conditions. [Marcel Molina Jr.]
957
958 * Multiple enhancements and adjustments to DB2 adaptor. #3377 [contact@maik-schmidt.de]
959
960 * Sanitize scoped conditions. [Marcel Molina Jr.]
961
962 * Added option to Base.reflection_of_all_associations to specify a specific association to scope the call. For example Base.reflection_of_all_associations(:has_many) [DHH]
963
964 * Added ActiveRecord::SchemaDumper.ignore_tables which tells SchemaDumper which tables to ignore. Useful for tables with funky column like the ones required for tsearch2. [TobiasLuetke]
965
966 * SchemaDumper now doesn't fail anymore when there are unknown column types in the schema. Instead the table is ignored and a Comment is left in the schema.rb. [TobiasLuetke]
967
968 * Fixed that saving a model with multiple habtm associations would only save the first one.  #3244 [yanowitz-rubyonrails@quantumfoam.org, Florian Weber]
969
970 * Fix change_column to work with PostgreSQL 7.x and 8.x.  #3141 [wejn@box.cz, Rick Olson, Scott Barron]
971
972 * removed :piggyback in favor of just allowing :select on :through associations. [Tobias Luetke]
973
974 * made method missing delegation to class methods on relation target work on :through associations. [Tobias Luetke]
975
976 * made .find() work on :through relations. [Tobias Luetke]
977
978 * Fix typo in association docs. #3296. [Blair Zajac]
979
980 * Fixed :through relations when using STI inherited classes would use the inherited class's name as foreign key on the join model [Tobias Luetke]
981
982 *1.13.2* (December 13th, 2005)
983
984 * Become part of Rails 1.0
985
986 * MySQL: allow encoding option for mysql.rb driver.  [Jeremy Kemper]
987
988 * Added option inheritance for find calls on has_and_belongs_to_many and has_many assosociations [DHH]. Example:
989
990     class Post
991       has_many :recent_comments, :class_name => "Comment", :limit => 10, :include => :author
992     end
993    
994     post.recent_comments.find(:all) # Uses LIMIT 10 and includes authors
995     post.recent_comments.find(:all, :limit => nil) # Uses no limit but include authors
996     post.recent_comments.find(:all, :limit => nil, :include => nil) # Uses no limit and doesn't include authors
997
998 * Added option to specify :group, :limit, :offset, and :select options from find on has_and_belongs_to_many and has_many assosociations [DHH]
999
1000 * MySQL: fixes for the bundled mysql.rb driver.  #3160 [Justin Forder]
1001
1002 * SQLServer: fix obscure optimistic locking bug.  #3068 [kajism@yahoo.com]
1003
1004 * SQLServer: support uniqueidentifier columns.  #2930 [keithm@infused.org]
1005
1006 * SQLServer: cope with tables names qualified by owner.  #3067 [jeff@ministrycentered.com]
1007
1008 * SQLServer: cope with columns with "desc" in the name.  #1950 [Ron Lusk, Ryan Tomayko]
1009
1010 * SQLServer: cope with primary keys with "select" in the name.  #3057 [rdifrango@captechventures.com]
1011
1012 * Oracle: active? performs a select instead of a commit.  #3133 [Michael Schoen]
1013
1014 * MySQL: more robust test for nullified result hashes.  #3124 [Stefan Kaes]
1015
1016 * Reloading an instance refreshes its aggregations as well as its associations.  #3024 [François Beausolei]
1017
1018 * Fixed that using :include together with :conditions array in Base.find would cause NoMethodError #2887 [Paul Hammmond]
1019
1020 * PostgreSQL: more robust sequence name discovery.  #3087 [Rick Olson]
1021
1022 * Oracle: use syntax compatible with Oracle 8.  #3131 [Michael Schoen]
1023
1024 * MySQL: work around ruby-mysql/mysql-ruby inconsistency with mysql.stat.  Eliminate usage of mysql.ping because it doesn't guarantee reconnect.  Explicitly close and reopen the connection instead.  [Jeremy Kemper]
1025
1026 * Added preliminary support for polymorphic associations [DHH]
1027
1028 * Added preliminary support for join models [DHH]
1029
1030 * Allow validate_uniqueness_of to be scoped by more than just one column.  #1559. [jeremy@jthopple.com, Marcel Molina Jr.]
1031
1032 * Firebird: active? and reconnect! methods for handling stale connections.  #428 [Ken Kunz <kennethkunz@gmail.com>]
1033
1034 * Firebird: updated for FireRuby 0.4.0.  #3009 [Ken Kunz <kennethkunz@gmail.com>]
1035
1036 * MySQL and PostgreSQL: active? compatibility with the pure-Ruby driver.  #428 [Jeremy Kemper]
1037
1038 * Oracle: active? check pings the database rather than testing the last command status.  #428 [Michael Schoen]
1039
1040 * SQLServer: resolve column aliasing/quoting collision when using limit or offset in an eager find.  #2974 [kajism@yahoo.com]
1041
1042 * Reloading a model doesn't lose track of its connection.  #2996 [junk@miriamtech.com, Jeremy Kemper]
1043
1044 * Fixed bug where using update_attribute after pushing a record to a habtm association of the object caused duplicate rows in the join table. #2888 [colman@rominato.com, Florian Weber, Michael Schoen]
1045
1046 * MySQL, PostgreSQL: reconnect! also reconfigures the connection.  Otherwise, the connection 'loses' its settings if it times out and is reconnected.  #2978 [Shugo Maeda]
1047
1048 * has_and_belongs_to_many: use JOIN instead of LEFT JOIN.  [Jeremy Kemper]
1049
1050 * MySQL: introduce :encoding option to specify the character set for client, connection, and results.  Only available for MySQL 4.1 and later with the mysql-ruby driver.  Do SHOW CHARACTER SET in mysql client to see available encodings.  #2975 [Shugo Maeda]
1051
1052 * Add tasks to create, drop and rebuild the MySQL and PostgreSQL test  databases. [Marcel Molina Jr.]
1053
1054 * Correct boolean handling in generated reader methods.  #2945 [don.park@gmail.com, Stefan Kaes]
1055
1056 * Don't generate read methods for columns whose names are not valid ruby method names.  #2946 [Stefan Kaes]
1057
1058 * Document :force option to create_table.  #2921 [Blair Zajac <blair@orcaware.com>]
1059
1060 * Don't add the same conditions twice in has_one finder sql.  #2916 [Jeremy Evans]
1061
1062 * Rename Version constant to VERSION. #2802 [Marcel Molina Jr.]
1063
1064 * Introducing the Firebird adapter.  Quote columns and use attribute_condition more consistently.  Setup guide: http://wiki.rubyonrails.com/rails/pages/Firebird+Adapter  #1874 [Ken Kunz <kennethkunz@gmail.com>]
1065
1066 * SQLServer: active? and reconnect! methods for handling stale connections.  #428 [kajism@yahoo.com, Tom Ward <tom@popdog.net>]
1067
1068 * Associations handle case-equality more consistently: item.parts.is_a?(Array) and item.parts === Array.  #1345 [MarkusQ@reality.com]
1069
1070 * SQLServer: insert uses given primary key value if not nil rather than SELECT @@IDENTITY.  #2866 [kajism@yahoo.com, Tom Ward <tom@popdog.net>]
1071
1072 * Oracle: active? and reconnect! methods for handling stale connections.  Optionally retry queries after reconnect.  #428 [Michael Schoen <schoenm@earthlink.net>]
1073
1074 * Correct documentation for Base.delete_all.  #1568 [Newhydra]
1075
1076 * Oracle: test case for column default parsing.  #2788 [Michael Schoen <schoenm@earthlink.net>]
1077
1078 * Update documentation for Migrations.  #2861 [Tom Werner <tom@cube6media.com>]
1079
1080 * When AbstractAdapter#log rescues an exception, attempt to detect and reconnect to an inactive database connection.  Connection adapter must respond to the active? and reconnect! instance methods.  Initial support for PostgreSQL, MySQL, and SQLite.  Make certain that all statements which may need reconnection are performed within a logged block: for example, this means no avoiding log(sql, name) { } if @logger.nil?  #428 [Jeremy Kemper]
1081
1082 * Oracle: Much faster column reflection.  #2848 [Michael Schoen <schoenm@earthlink.net>]
1083
1084 * Base.reset_sequence_name analogous to reset_table_name (mostly useful for testing).  Base.define_attr_method allows nil values.  [Jeremy Kemper]
1085
1086 * PostgreSQL: smarter sequence name defaults, stricter last_insert_id, warn on pk without sequence.  [Jeremy Kemper]
1087
1088 * PostgreSQL: correctly discover custom primary key sequences.  #2594 [Blair Zajac <blair@orcaware.com>, meadow.nnick@gmail.com, Jeremy Kemper]
1089
1090 * SQLServer: don't report limits for unsupported field types.  #2835 [Ryan Tomayko]
1091
1092 * Include the Enumerable module in ActiveRecord::Errors.  [Rick Bradley <rick@rickbradley.com>]
1093
1094 * Add :group option, correspond to GROUP BY, to the find method and to the has_many association.  #2818 [rubyonrails@atyp.de]
1095
1096 * Don't cast nil or empty strings to a dummy date.  #2789 [Rick Bradley <rick@rickbradley.com>]
1097
1098 * acts_as_list plays nicely with inheritance by remembering the class which declared it.  #2811 [rephorm@rephorm.com]
1099