aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
* Hash#to_xml supports YAML attributes; ActiveRecord::Base#to_xml support ↵Jeremy Kemper2007-03-182-7/+18
| | | | | | serialized attributes. Closes #7502. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6444 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Base.update_all :order and :limit options. Useful for MySQL updates that ↵Jeremy Kemper2007-03-171-0/+6
| | | | | | must be ordered to avoid violating unique constraints. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6440 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated object transactions. People relying on this functionality ↵Michael Koziarski2007-03-161-20/+0
| | | | | | should install the object_transactions plugin at http://code.bitsweat.net/svn/object_transactions. Closes #5637 [Koz, Jeremy Kemper] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6439 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove special cases for BigDecimal and SQLite, tests pass without them and ↵Michael Koziarski2007-03-161-9/+3
| | | | | | | | | fail with them. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6437 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix typo in migration test.Jeremy Kemper2007-03-161-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6434 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: remove DateTime -> Time downcast. Bypass the DateTime migration ↵Jeremy Kemper2007-03-161-4/+6
| | | | | | test on 64-bit platforms since it may be a Time. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* find_or_create_by_* takes a hash so you can create with more attributes than ↵Jeremy Kemper2007-03-141-0/+19
| | | | | | are in the method name. Closes #7368. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6420 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure with_scope takes both :select and :joins into account when setting ↵Michael Koziarski2007-03-131-0/+10
| | | | | | :readonly. Allows you to save records you retrieve using finders on a has_many :through associations. [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow a polymorphic :source for has_many :through associations. Closes ↵Rick Olson2007-03-132-0/+14
| | | | | | #7143 [protocool] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6408 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* forgot to add tests for #7044Rick Olson2007-03-131-0/+145
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6406 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Consistently quote primary key column names. Closes #7763.Jeremy Kemper2007-03-0922-1/+99
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6364 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures: fix YAML ordered map support. Closes #2665.Jeremy Kemper2007-03-091-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* DateTimes assume the default timezone. Closes #7764.Jeremy Kemper2007-03-091-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6359 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: overflow Time to DateTime. Closes #7718.Jeremy Kemper2007-03-063-4/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6348 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix an edge case with dates during the Italian calendar reform! Hehe. Closes ↵Jeremy Kemper2007-03-061-2/+9
| | | | | | #7724. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6341 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix has_many :through << with custom foreign keys. Closes #6466, #7153.Jeremy Kemper2007-03-052-2/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6336 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test DateTime native type in migrations. References #7649.Jeremy Kemper2007-03-041-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6304 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLServer: recognize real column type as Ruby float, correctly schema-dump ↵Jeremy Kemper2007-03-032-1/+22
| | | | | | tables with no indexes or descending indexes. References #7057, #7703. Closes #7333. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6297 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added fixtures :all to test_helper.rb to assume that most people just want ↵David Heinemeier Hansson2007-02-254-0/+9
| | | | | | all their fixtures loaded all the time [DHH] Added fixtures :all as a way of loading all fixtures in the fixture directory at once (closes #7214) [manfred] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added database connection as a yield parameter to ↵David Heinemeier Hansson2007-02-211-1/+19
| | | | | | ActiveRecord::Base.transaction so you can manually rollback [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6196 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed query cache when multiple database connections were involvedTobias Lütke2007-02-211-0/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6195 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* You can now use cache in instance hierachies. This allows ↵Tobias Lütke2007-02-201-2/+18
| | | | | | ActiveRecord::Base.cache { } usage to cache everything git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6179 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL disallows TEXT defaults so don't test for them.Jeremy Kemper2007-02-111-3/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6149 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made increment_counter/decrement_counter play nicely with optimistic ↵Jamis Buck2007-02-071-0/+51
| | | | | | locking, and added a more general update_counters method git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6139 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introducing Model.cache { ... } for the occasional query caching needs. ( ↵Tobias Lütke2007-02-062-16/+100
| | | | | | fantastic to reduce the 200 SELECT * from accounts WHERE id=1 queries in your views ) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6138 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* When dealing with SQLite3, use the table_info pragma helper, so that the ↵Jamis Buck2007-01-301-1/+1
| | | | | | bindings can do some translation for when sqlite3 breaks incompatibly between point releases. Also, make current_adapter? use is_a? instead of instance_of? to account correctly for adapter subclassing. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6091 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: fix lob and text default handling. Closes #7344.Jeremy Kemper2007-01-291-18/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6090 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLServer: don't choke on strings containing 'null'. Closes #7083.Jeremy Kemper2007-01-281-2/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: blob and text columns may not have defaults in 5.x. Update fixtures ↵Jeremy Kemper2007-01-283-4/+11
| | | | | | schema for strict mode. Closes #6695. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6074 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* update_all can take a Hash argument. sanitize_sql splits into two methods ↵Jeremy Kemper2007-01-281-10/+23
| | | | | | for conditions and assignment since NULL values and delimiters are handled differently. References #6583, closes #7365. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6073 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Post title and body not null. References #6778.Jeremy Kemper2007-01-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: SET SQL_AUTO_IS_NULL=0 so 'where id is null' doesn't select the last ↵Jeremy Kemper2007-01-281-0/+6
| | | | | | inserted id. Closes #6778. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6064 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't create instance writer methods for class attributes. Closes #7401 [Rick]Rick Olson2007-01-281-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add missing tests ensuring callbacks work with class inheritance. Closes ↵Rick Olson2007-01-241-0/+23
| | | | | | #7339 [sandofsky] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6026 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures use the table name and connection from set_fixture_class. Closes #7330.Jeremy Kemper2007-01-241-0/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6023 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Subclasses of an abstract class work with single-table inheritance. ↵Jeremy Kemper2007-01-232-1/+12
| | | | | | References #5704, closes #7284. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6013 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow the Oracle adapter to insert a string "null". Closes #6997 [laurelfan]Michael Koziarski2007-01-161-1/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* change_column accepts :default => nil. Closes #6956.Jeremy Kemper2007-01-151-2/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL, PostgreSQL: change_column_default quotes the default value and ↵Jeremy Kemper2007-01-151-2/+14
| | | | | | doesn't lose column type information. References #3987, closes #6664. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: create_table takes a :sequence_name option to override the ↵Jeremy Kemper2007-01-153-2/+56
| | | | | | 'tablename_seq' default. Closes #7000. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5933 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test that calculations don't modify their options hash. References #6929. ↵Jeremy Kemper2007-01-141-0/+8
| | | | | | [eventualbuddha] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5931 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Aggregate reflection klass works with nested :class_nameJeremy Kemper2007-01-141-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5923 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Apply scoping during initialize instead of create. Fixes setting of foreign ↵Tobias Lütke2007-01-121-0/+7
| | | | | | key when using find_or_initialize_by with scoping. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Demonstrate that a value's required. References #6156.Jeremy Kemper2007-01-121-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5903 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oops. References #6156.Jeremy Kemper2007-01-121-5/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5902 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test MySQL implicit NULL for integer columns. Closes #6156.Jeremy Kemper2007-01-121-0/+26
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5901 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLServer: handle [quoted] table names. Closes #6635.Jeremy Kemper2007-01-123-0/+32
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* acts_as_nested_set works with single-table inheritance. Closes #6030.Jeremy Kemper2007-01-123-2/+42
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: use a subselect to correctly perform eager finds with :limit and ↵Jeremy Kemper2007-01-121-0/+10
| | | | | | :order. Closes #4668. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5887 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix new_record? and id rollback. Closes #6910.Jeremy Kemper2007-01-121-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5886 5ecf4fe2-1ee6-0310-87b1-e25e094e27de