aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
...
* Added counter optimization for AssociationCollection#any? so ↵David Heinemeier Hansson2006-12-053-0/+8
| | | | | | person.friends.any? won't actually load the full association if we have the count in a cheaper form [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5676 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Subclasses of an abstract class work with single-table inheritance. Closes ↵Jeremy Kemper2006-12-016-11/+70
| | | | | | #5704. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* If only life was that simple (it didnt help)David Heinemeier Hansson2006-12-014-8/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace the elaborate reloading connection checking scheme, just fix the ↵David Heinemeier Hansson2006-12-014-20/+8
| | | | | | Ruby-based MySQL adapter, ye? git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5656 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Only reload connections in development mode that supports (and requires ↵David Heinemeier Hansson2006-11-263-0/+18
| | | | | | that) -- in other words, only do it for SQLite (closes #6687, #6700) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change fixture_path to a class inheritable accessor allowing test cases to ↵Michael Koziarski2006-11-212-1/+3
| | | | | | have their own custom set of fixtures. Closes #6672 [zdennis] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5604 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quote ActiveSupport::Multibyte::Chars. Closes #6653.Jeremy Kemper2006-11-203-1/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5597 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test for forged '' default before it's typecast. Closes #6156.Jeremy Kemper2006-11-203-4/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test has_one :dependent => :nullify with missing association. Closes #4848.Jeremy Kemper2006-11-201-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5595 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test has_one :dependent => :nullify with missing association. Closes #4828.Jeremy Kemper2006-11-202-1/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5594 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Simplify query_attribute by typecasting the attribute value and checking ↵Jeremy Kemper2006-11-203-16/+37
| | | | | | whether it's nil, false, zero or blank. Closes #6659. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5593 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* validates_numericality_of uses \A \Z to ensure the entire string matches ↵Jeremy Kemper2006-11-203-15/+26
| | | | | | rather than ^ $ which may match one valid line of a multiline string. Closes #5716. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5589 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Run validations in the order they were declared. Closes #6657.Jeremy Kemper2006-11-203-8/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5588 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: detect when a NOT NULL column without a default value is misreported ↵Jeremy Kemper2006-11-204-4/+41
| | | | | | as default ''. Can't detect for string, text, and binary columns since '' is a legitimate default. Closes #6156. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Simplify association proxy implementation by factoring construct_scope out ↵Jeremy Kemper2006-11-194-30/+25
| | | | | | of method_missing. Closes #6643. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migration benchmark wrappers use alias_method_chain. Closes #6456.Jeremy Kemper2006-11-191-5/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Mysql::Result#all_hashes compatibility with Mysql C driver 2.6.x. Closes #6601.Jeremy Kemper2006-11-162-21/+23
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5533 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cleanup SQLite AUTOINCREMENT: exclude sqlite_sequence table, factor out ↵Jeremy Kemper2006-11-144-4/+25
| | | | | | feature availability check. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update Oracle performance credits.Jeremy Kemper2006-11-141-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5518 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: automatically detect the primary key. Closes #6594.Jeremy Kemper2006-11-133-5/+26
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5514 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: to increase performance, prefetch 100 rows and enable similar cursor ↵Jeremy Kemper2006-11-132-2/+8
| | | | | | sharing. Both are configurable in database.yml. Closes #6607. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5509 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: fix limited id selection for eager loading. Closes #6515.Jeremy Kemper2006-11-106-26/+58
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5480 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't inspect unloaded associations. Closes #2905.Jeremy Kemper2006-11-103-0/+35
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5478 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLite: use AUTOINCREMENT primary key in >= 3.1.0. Closes #6588.Jeremy Kemper2006-11-093-1/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5477 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cache inheritance_column. Closes #6592.Jeremy Kemper2006-11-094-7/+22
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Firebird: decimal/numeric support. Closes #6408.Jeremy Kemper2006-11-073-11/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5459 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* make add_order a tad faster (Closes #6567)Jamis Buck2006-11-072-4/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5452 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Find with :include respects scoped :order. Closes #5850.Jeremy Kemper2006-11-073-1/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5445 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Support nil and Array in :conditions => { attr => value } hashes. Closes #6548.Jeremy Kemper2006-11-053-33/+50
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5435 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Consistently use LOWER() for uniqueness validations (rather than mixing with ↵Jeremy Kemper2006-11-052-2/+4
| | | | | | UPPER()) so the database can always use a functional index on the lowercased column. Closes #6495. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5434 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLite: count(distinct) queries supported in >= 3.2.6, fix calculations ↵Jeremy Kemper2006-11-058-100/+79
| | | | | | workaround, remove count(distinct) query rewrite, cleanup test connection scripts. Closes #6544. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5426 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dynamically generate reader methods for serialized attributes. Closes #6362.Jeremy Kemper2006-11-023-4/+22
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation: object transactions warning.Jeremy Kemper2006-11-023-11/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5405 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* has_one :dependent => :nullify ignores nil associates. Closes #6528.Jeremy Kemper2006-11-023-2/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5401 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: resolve test failures, use prefetched primary key for inserts, check ↵Jeremy Kemper2006-11-0112-117/+64
| | | | | | for null defaults. Factor out some common methods from all adapters. Closes #6515. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* a few more deprecation improvementsJamis Buck2006-10-241-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* update deprecations to include alternative methods (where available)Jamis Buck2006-10-245-18/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5359 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make add_column use the options hash with the Sqlite Adapter. Closes #6464 ↵Michael Koziarski2006-10-242-1/+3
| | | | | | [obrie] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5353 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document other options available to migration's add_column. #6419Marcel Molina2006-10-222-1/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5333 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: all_hashes compatibility with old MysqlRes class. Closes #6429.Jeremy Kemper2006-10-202-4/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5330 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix has_many :through to add the appropriate conditions when going through ↵Rick Olson2006-10-163-7/+20
| | | | | | an association using STI. Closes #5783. [Jonathan Viney] (sorry, forgot to commit the actual files) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5310 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix has_many :through to add the appropriate conditions when going through ↵Rick Olson2006-10-153-2/+29
| | | | | | an association using STI. Closes #5783. [Jonathan Viney] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5305 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* automatically add primary key to #select_limited_ids_list order by clause ↵Rick Olson2006-10-134-1/+12
| | | | | | for databases that require order columns in the distinct statements (postgresql) [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5292 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix select_limited_ids_list issues in postgresql, retain current behavior in ↵Rick Olson2006-10-135-7/+27
| | | | | | other adapters [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5291 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* add test for select_limited_ids_list that passes in mysql/sqlite and fails ↵Rick Olson2006-10-131-0/+15
| | | | | | in postgresql git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5290 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Restore eager condition interpolation, document it's differences [Rick]Rick Olson2006-10-114-4/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5284 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Compare to 0 rather than call zero? to handle nil.Jeremy Kemper2006-10-111-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5282 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Wrap save! in a transaction. Closes #6324.Jeremy Kemper2006-10-102-3/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5281 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* improve example in migrations docs, closes #6370Jeremy Kemper2006-10-091-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5275 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't rollback in teardown unless a transaction was started. Don't start a ↵Jeremy Kemper2006-10-093-5/+33
| | | | | | transaction in create_fixtures if a transaction is started. Closes #6282. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de