aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
...
* make sure query attributes on custom fields works as it used toJamis Buck2006-12-291-1/+22
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5807 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure dynamic finders are anchored to the beginning of the method name to ↵Michael Koziarski2006-12-271-0/+7
| | | | | | 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-212-6/+10
| | | | | | the associated records. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5769 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Partially revert [5660] - makes more trouble than it resolves. References ↵Jeremy Kemper2006-12-191-2/+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-191-0/+36
| | | | | | subclass. Closes #6840. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5751 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* use RAILS_DEFAULT_LOGGER in debug mode so we can log Dependencies activityJeremy Kemper2006-12-191-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5750 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* utf8 mysql topics tableJeremy Kemper2006-12-191-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5749 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix faulty inheritance tests and that eager loading grabs the wrong ↵Rick Olson2006-12-191-2/+15
| | | | | | 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
* Don't do introspection queries during locking tests [Michael Schoen]Jeremy Kemper2006-12-061-2/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5689 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Consolidated different create and create! versions to call through to the ↵Tobias Lütke2006-12-061-0/+25
| | | | | | 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-17/+29
| | | | | | ... 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
* Add AssociationCollection#create! to be consistent with ↵Tobias Lütke2006-12-051-0/+3
| | | | | | 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/+2
| | | | | | 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-014-8/+62
| | | | | | #5704. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quote ActiveSupport::Multibyte::Chars. Closes #6653.Jeremy Kemper2006-11-201-0/+12
| | | | 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-1/+1
| | | | 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 #4828.Jeremy Kemper2006-11-201-0/+7
| | | | 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-201-1/+28
| | | | | | 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-12/+19
| | | | | | 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-7/+16
| | | | 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-202-4/+20
| | | | | | 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
* Cleanup SQLite AUTOINCREMENT: exclude sqlite_sequence table, factor out ↵Jeremy Kemper2006-11-142-1/+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-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5514 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't inspect unloaded associations. Closes #2905.Jeremy Kemper2006-11-101-0/+29
| | | | 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-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5477 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cache inheritance_column. Closes #6592.Jeremy Kemper2006-11-091-2/+14
| | | | 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-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5459 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Find with :include respects scoped :order. Closes #5850.Jeremy Kemper2006-11-071-0/+10
| | | | 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-2/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5435 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLite: count(distinct) queries supported in >= 3.2.6, fix calculations ↵Jeremy Kemper2006-11-054-38/+21
| | | | | | 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-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation: object transactions warning.Jeremy Kemper2006-11-021-6/+8
| | | | 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/+11
| | | | 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-014-7/+9
| | | | | | 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
* 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-131-1/+1
| | | | | | 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-131-2/+1
| | | | | | 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-112-1/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5284 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't rollback in teardown unless a transaction was started. Don't start a ↵Jeremy Kemper2006-10-091-1/+27
| | | | | | 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
* Add #delete support to has_many :through associations. Closes #6049 [Martin ↵Rick Olson2006-10-091-0/+33
| | | | | | Landers] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5267 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removes the ability for eager loaded conditions to be interpolated, since ↵Rick Olson2006-10-096-7/+14
| | | | | | there is no model instance to use as a context for interpolation. #5553 [turnip@turnipspatch.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5264 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed rename_table on SQLite tables with indexes defined (closes #5942) ↵David Heinemeier Hansson2006-10-091-0/+21
| | | | | | [brandon@opensoul.org] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5260 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added timeout option to SQLite3 configurations to deal more gracefully with ↵David Heinemeier Hansson2006-10-091-1/+1
| | | | | | SQLite3::BusyException, now the connection can instead retry for x seconds to see if the db clears up before throwing that exception (closes #6126) [wreese@gmail.com] Added default timeout setting of 5 seconds to SQLite3 database.yml configurations [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5258 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added update_attributes! which uses save! to raise an exception if a ↵David Heinemeier Hansson2006-10-091-1/+38
| | | | | | validation error prevents saving (closes #6192) [jonathan] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5256 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecated add_on_boundary_breaking (use validates_length_of instead) ↵David Heinemeier Hansson2006-10-092-18/+13
| | | | | | (closes #6292) [BobSilva] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5255 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* The has_many create method works with polymorphic associations. Closes #6361.Jeremy Kemper2006-10-081-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* add a failing test so we can make it happy againJamis Buck2006-10-041-0/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5225 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* save! shouldn't validate twice. Closes #6324.Jeremy Kemper2006-10-021-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5215 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Association collections have an _ids reader method to match the existing ↵Jeremy Kemper2006-10-011-0/+39
| | | | | | 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. References #1887, Closes #5780. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5214 5ecf4fe2-1ee6-0310-87b1-e25e094e27de