aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
Commit message (Collapse)AuthorAgeFilesLines
* Docs fix for columns_hash [bradediger]Michael Koziarski2006-12-271-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5797 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure dynamic finders are anchored to the beginning of the method name to ↵Michael Koziarski2006-12-271-2/+2
| | | | | | prevent git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5795 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pushing a record on an association collection doesn't unnecessarily load all ↵Jeremy Kemper2006-12-211-4/+3
| | | | | | the associated records. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5769 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: fix connection reset failure. Closes #6846.Jeremy Kemper2006-12-201-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Partially revert [5660] - makes more trouble than it resolves. References ↵Jeremy Kemper2006-12-191-5/+2
| | | | | | #5704, closes #6766. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5753 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Subclass instantiation doesn't try to explicitly require the corresponding ↵Jeremy Kemper2006-12-192-9/+3
| | | | | | subclass. Closes #6840. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5751 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix faulty inheritance tests and that eager loading grabs the wrong ↵Rick Olson2006-12-191-1/+1
| | | | | | inheritance column when the class of your association is an STI subclass. Closes #6859 [protocool] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove side effects of [5684]Tobias Lütke2006-12-082-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5705 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Consolidated different create and create! versions to call through to the ↵Tobias Lütke2006-12-063-24/+44
| | | | | | base class with scope. This fixes inconsistencies, especially related to protected attribtues. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5684 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* find supports :lock with :include. Check whether your database allows SELECT ↵Jeremy Kemper2006-12-051-0/+1
| | | | | | ... FOR UPDATE with outer joins before using. Closes #6764. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5682 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* AssociationCollection#any? takes a block [Michael Schoen]Jeremy Kemper2006-12-051-3/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add AssociationCollection#create! to be consistent with ↵Tobias Lütke2006-12-051-8/+15
| | | | | | AssociationCollection#create when dealing with a foreign key that is a protected attribute git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5677 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added counter optimization for AssociationCollection#any? so ↵David Heinemeier Hansson2006-12-051-0/+4
| | | | | | 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-011-3/+6
| | | | | | #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-211-1/+1
| | | | | | 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-201-1/+2
| | | | 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-201-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Simplify query_attribute by typecasting the attribute value and checking ↵Jeremy Kemper2006-11-201-15/+7
| | | | | | 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-201-3/+5
| | | | | | 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-201-1/+1
| | | | 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-201-0/+19
| | | | | | 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-193-30/+23
| | | | | | 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-161-20/+22
| | | | 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-141-2/+12
| | | | | | feature availability check. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: automatically detect the primary key. Closes #6594.Jeremy Kemper2006-11-131-4/+23
| | | | 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-131-2/+6
| | | | | | 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-105-25/+57
| | | | 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-101-0/+4
| | | | 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-091-1/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5477 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cache inheritance_column. Closes #6592.Jeremy Kemper2006-11-092-5/+6
| | | | 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-071-10/+7
| | | | 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-071-4/+6
| | | | 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-071-1/+1
| | | | 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-051-31/+33
| | | | 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-051-2/+2
| | | | | | 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-052-61/+53
| | | | | | 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-021-3/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation: object transactions warning.Jeremy Kemper2006-11-021-5/+14
| | | | 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-021-1/+1
| | | | 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-017-110/+53
| | | | | | 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-241-1/+1
| | | | | | [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-221-1/+2
| | | | 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-201-4/+10
| | | | 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-162-7/+18
| | | | | | 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