aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
* Find with a list of ids supports limit/offset. Closes #8437.Jeremy Kemper2007-05-251-46/+49
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6845 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimistic locking: revert the lock version when an update fails. Closes ↵Jeremy Kemper2007-05-251-0/+14
| | | | | | #7840. Also return the number of affected rows instead of true. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6843 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migrations: add_column supports custom column types. Closes #7742. ↵Jeremy Kemper2007-05-251-0/+14
| | | | | | First-patch cheers to jsgarvin\! git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6842 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test reconnection after MySQL client timeout. References #428.Jeremy Kemper2007-05-252-2/+32
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Include some missing fixtures. Closes #7981.Jeremy Kemper2007-05-252-3/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6832 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that associations with :dependent => :delete_all respect :conditions ↵Rick Olson2007-05-242-0/+26
| | | | | | option. Closes #8034 [danger, joshpeek, Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* belongs_to assignment creates a new proxy rather than modifying its target ↵Jeremy Kemper2007-05-221-1/+14
| | | | | | in-place. Closes #8412. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6804 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* forgot binary fixtureRick Olson2007-05-211-0/+437
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6801 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix column type detection while loading fixtures. Closes #7987 [roderickvd]Rick Olson2007-05-211-5/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6798 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix #inspect for new records. Closes #8405.Jeremy Kemper2007-05-191-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pay tribute to timezones. Tune #inspect style.Jeremy Kemper2007-05-181-7/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6766 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sanitize Base#inspect. Closes #8392.Jeremy Kemper2007-05-182-33/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that the BigDecimal assertions aren't run for sqlite3, which doesn't ↵Michael Koziarski2007-05-181-4/+10
| | | | | | support the precision correctly git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6756 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace the transaction {|transaction|..} semantics with a new Exception ↵Michael Koziarski2007-05-181-2/+2
| | | | | | ActiveRecord::Rollback. Closes #8030 [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure copy table test runs for sqlite and sqlite3. [mislav] Cllosoes #8328Michael Koziarski2007-05-121-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6721 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sexy dumper now has its groove on (closes #8281) [Chris Wanstrath]David Heinemeier Hansson2007-05-111-4/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use assert_match instead of String#include? so we can get helpful error ↵Michael Koziarski2007-05-061-1/+3
| | | | | | messages on failure git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change Base#to_xml to take the name for a container element for an ↵Michael Koziarski2007-05-031-1/+8
| | | | | | association from the element name, not the first record's class name. Closes #7004 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug ↵David Heinemeier Hansson2007-04-281-2/+0
| | | | | | by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6611 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve Performance of calling create on has_many :through associations by ↵Michael Koziarski2007-04-261-2/+14
| | | | | | avoiding loading the target collection. Closes #8150 [evan] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6581 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added yielding of Builder instance for ActiveRecord::Base#to_xml calls [DHH]David Heinemeier Hansson2007-04-131-0/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* 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