aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
* Expand tabs and strip trailing whitespace.Jeremy Kemper2005-11-101-177/+171
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2965 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* acts_as_list plays nicely with inheritance by remembering the class which ↵Jeremy Kemper2005-11-103-0/+178
| | | | | | declared it. Closes #2811. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2964 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed acts_as_list for definitions without an explicit :order #2803 ↵David Heinemeier Hansson2005-11-093-2/+28
| | | | | | [jonathan@bluewire.net.nz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2951 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct handling of complex order clauses with SQL Server limit emulation. ↵Jeremy Kemper2005-11-081-0/+10
| | | | | | Closes #2770. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2943 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Destroy associated has_and_belongs_to_many records after all before_destroy ↵Jeremy Kemper2005-11-082-3/+16
| | | | | | callbacks but before destroy. This allows you to act on the habtm association as you please while preserving referential integrity. Closes #2065. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add :order option to Author.posts_with_comments_and_categories so that tests ↵Jeremy Kemper2005-11-081-30/+30
| | | | | | which assume implicit id order pass with database which do not provide it. Scrubbed whitespace. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :include as an option for association declarations [DHH]David Heinemeier Hansson2005-11-063-0/+32
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed missing join table fixturesDavid Heinemeier Hansson2005-11-061-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made association extensions use simpler block syntaxDavid Heinemeier Hansson2005-11-063-9/+40
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2895 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2916@asus: jeremy | 2005-11-06 05:04:06 -0800Jeremy Kemper2005-11-061-1/+1
| | | | | | | Rename conditions_scoping_test to method_scoping_test. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2915@asus: jeremy | 2005-11-06 05:02:53 -0800Jeremy Kemper2005-11-063-25/+50
| | | | | | | Rename Base.constrain to Base.with_scope so it doesn't conflict with existing concept of database constraints. Make scoping more robust: uniform method => parameters, validated method names and supported finder parameters, raise exception on nested scopes. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2888 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added extension capabilities to has_many and has_and_belongs_to_many proxies ↵David Heinemeier Hansson2005-11-046-11/+43
| | | | | | [DHH] Added find_or_create_by_X as a second type of dynamic finder that'll create the record if it doesn't already exist [DHH] Added constrain scoping for creates using a hash of attributes bound to the :creation key [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Explicitly require topic from reply fixture.Jeremy Kemper2005-11-041-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2867 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Model.create! to match existing model.save! method. When save! raises ↵Jeremy Kemper2005-11-031-2/+10
| | | | | | RecordInvalid, you can catch the exception, retrieve the invalid record (invalid_exception.record), and see its errors (invalid_exception.record.errors). git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2863 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added extension capabilities to has_many and has_and_belongs_to_many proxies ↵David Heinemeier Hansson2005-11-033-4/+35
| | | | | | [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2861 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct reader method generation for primary key attribute: handle case when ↵Jeremy Kemper2005-11-021-1/+1
| | | | | | primary_key is defined but its column is nil, such as when the model class is backed by a view. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that an DuplicateMigrationVersionError gets raised when multiple ↵Florian Weber2005-10-315-0/+46
| | | | | | migrations have the same version number. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2832 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed :dbfile to :database for SQLite adapter for consistency (old key ↵David Heinemeier Hansson2005-10-303-5/+5
| | | | | | still works as an alias) (closes #2644) [Dan Peterson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2825 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added migration support for Oracle (closes #2647) [Michael Schoen]David Heinemeier Hansson2005-10-297-41/+44
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed SQL Server adapter so it honors options[:conditions] when applying ↵David Heinemeier Hansson2005-10-282-1/+7
| | | | | | :limits (closes #1978) [Tom Ward] Fixed SQL Server adapter to pass even more tests and do even better (closes #2634) [rtomayko@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2781 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made more tests for SQLServer pass (closes #2486) [Tom Ward]David Heinemeier Hansson2005-10-281-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2779 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added migration support to SQL Server adapter (please someone do the same ↵David Heinemeier Hansson2005-10-282-25/+51
| | | | | | for Oracle and DB2) (closes #2625) [Tom Ward] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2778 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3800@sedna: jeremy | 2005-10-28 00:39:05 -0700Jeremy Kemper2005-10-282-5/+70
| | | | | | | Readonly constraints, association collection method_missing, dup constraint options git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2774 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor DB exceptions and deal more with DB2 (closes #2624)David Heinemeier Hansson2005-10-277-58/+44
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :offset and :limit to the kinds of options that Base.constrain can use ↵David Heinemeier Hansson2005-10-261-0/+24
| | | | | | (closes #2466) [duane.johnson@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed handling of nil number columns on Oracle and cleaned up tests for ↵David Heinemeier Hansson2005-10-267-34/+34
| | | | | | Oracle in general #2555 [schoenm@earthlink.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2741 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added quoted_true and quoted_false methods to db2_adapter and cleaned up ↵David Heinemeier Hansson2005-10-262-2/+1
| | | | | | tests for DB2 (closes #2493) [maik schmidt] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2739 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow symbols to rename columns when using SQLite adapter. #2531 ↵Jamis Buck2005-10-251-0/+22
| | | | | | [kevin.clark@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2731 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2736@asus: jeremy | 2005-10-24 17:08:12 -0700Jeremy Kemper2005-10-254-82/+3
| | | | | | | | | | | | | | | | | | | Test for eager associations with limits should not assume that records are ordered by id. r2737@asus: jeremy | 2005-10-24 19:06:09 -0700 Fail fast if invalid primary key column. r2746@asus: jeremy | 2005-10-25 15:37:28 -0700 Begin rollback of fixture delete order. Its solves a problem for 1% of users who already have a workaround while severely slowing down the other 99%. r2747@asus: jeremy | 2005-10-25 16:03:01 -0700 Rollback the rest. r2748@asus: jeremy | 2005-10-25 16:06:26 -0700 Re-add fixtures declaration to conditions scoping test r2749@asus: jeremy | 2005-10-25 16:09:03 -0700 Re-add fixtures declaration to finder test r2750@asus: jeremy | 2005-10-25 16:13:50 -0700 Don't assume keyboards table is empty git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2730 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2727@asus: jeremy | 2005-10-24 14:14:36 -0700Jeremy Kemper2005-10-241-0/+41
| | | | | | | Fallback to @loaded_fixtures = {}. Use Logger#silence. Test fixture isolation with use_instantiated_fixtures and with no fixtures declaration. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2726@asus: jeremy | 2005-10-24 14:11:59 -0700Jeremy Kemper2005-10-241-6/+5
| | | | | | | correct primary key semantics: foo.id and foo.real_pk_column should both exist and return nil if foo.new_record? git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2718@asus: jeremy | 2005-10-23 14:45:30 -0700Jeremy Kemper2005-10-234-16/+53
| | | | | | | | | | | Ticket 2404 - fixture delete order r2719@asus: jeremy | 2005-10-23 15:01:13 -0700 Keep closer tabs on dirty, loaded, and declared fixtures. Closes #2404. r2720@asus: jeremy | 2005-10-23 16:09:19 -0700 ensure table names are strings. set dirty = dirty union loaded rather than dirty = loaded. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2714 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Clarify semantics of ActiveRecord::Base#respond_to? Closes #2560.Jeremy Kemper2005-10-223-1/+30
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2705 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Associations#clear for not-yet-loaded associations (Patrick Lenz)Tobias Lütke2005-10-201-0/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2695 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* HABTM finder sets :readonly => false. Closes #2525.Jeremy Kemper2005-10-201-14/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2694 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make all of tests runnable on their own.Marcel Molina2005-10-192-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2691 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Parenthesize :conditionsJeremy Kemper2005-10-181-8/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for using limits in eager loads that involve has_many and ↵David Heinemeier Hansson2005-10-181-2/+29
| | | | | | has_and_belongs_to_many associations git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2675 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* unbreak unit tests on windowsMichael Koziarski2005-10-181-2/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed a few sqlserver test case errors. Closes #2486Tobias Lütke2005-10-173-7/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* modified finder test a tiny bit so that it passes on sqlserverTobias Lütke2005-10-162-5/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3957@asus: jeremy | 2005-10-16 00:01:55 -0700Jeremy Kemper2005-10-161-0/+20
| | | | | | | more sequence tests from #2292 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2640 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3616@asus: jeremy | 2005-09-26 23:09:28 -0700Jeremy Kemper2005-10-166-6/+35
| | | | | | | | | | | | | | | | | | | | | | | Ticket 2292 - Sequences, schemas, and fixtures r3917@asus: jeremy | 2005-10-15 10:43:24 -0700 fix pk assert r3918@asus: jeremy | 2005-10-15 10:46:52 -0700 rework query cache connection= override r3919@asus: jeremy | 2005-10-15 10:47:45 -0700 correct fixtures usage r3920@asus: jeremy | 2005-10-15 10:53:23 -0700 correct attr assignment r3921@asus: jeremy | 2005-10-15 12:59:10 -0700 sequences r3922@asus: jeremy | 2005-10-15 16:36:09 -0700 reset fixtures work with sequences r3951@asus: jeremy | 2005-10-15 23:23:12 -0700 cut down excess features r3952@asus: jeremy | 2005-10-15 23:40:30 -0700 don't test for PostgreSQL specifically git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2639 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Comment out the memory leak test because it b0rks the testing environment. ↵Jamis Buck2005-10-161-18/+21
| | | | | | Update some contact info. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2636 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Renaming the deprecated finder testMichael Koziarski2005-10-151-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2625 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* squash the memleak in dev mode finally (fingers crossed, here)Jamis Buck2005-10-151-0/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2620 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Support ordered YAML fixtures. #1896Jeremy Kemper2005-10-152-0/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2600 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adds :nullify option to :depends. Closes #2015 (Robby Russell)Tobias Lütke2005-10-156-13/+56
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2595 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3618@sedna: jeremy | 2005-10-14 12:06:03 -0700Jeremy Kemper2005-10-151-0/+31
| | | | | | | | | Branch for :join tainting r3631@sedna: jeremy | 2005-10-14 20:13:49 -0700 Introduce read-only records, object.readonly\!, object.readonly?, Foo.find(:all, :readonly => true). Foo.find(:all, :joins => '...') also implies :readonly => true. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2594 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change quote delimiters for sql interpolation to obviate SyntaxErrors. ↵Marcel Molina2005-10-141-0/+6
| | | | | | Closes 2215. [leroen@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2593 5ecf4fe2-1ee6-0310-87b1-e25e094e27de