aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
Commit message (Collapse)AuthorAgeFilesLines
* Correct handling of complex order clauses with SQL Server limit emulation. ↵Jeremy Kemper2005-11-081-1/+1
| | | | | | Closes #2770. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2943 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct whitespace problem in Oracle default column value parsing. Closes ↵Jeremy Kemper2005-11-081-1/+1
| | | | | | #2788. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2942 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Destroy associated has_and_belongs_to_many records after all before_destroy ↵Jeremy Kemper2005-11-081-2/+11
| | | | | | 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
* Deprecate the old, confusing :exclusively_dependent option in favor of ↵Jeremy Kemper2005-11-081-9/+15
| | | | | | :dependent => :delete_all. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2939 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More compatible Oracle column reflection. Closes #2771.Jeremy Kemper2005-11-081-7/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made ready for 0.14.3 (RC4)David Heinemeier Hansson2005-11-071-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2930 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed faulty regex in get_table_name method (SQLServerAdapter) (closes ↵David Heinemeier Hansson2005-11-071-2/+2
| | | | | | #2639) [Ryan Tomayko] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2910 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :include as an option for association declarations [DHH]David Heinemeier Hansson2005-11-065-13/+33
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sharper exampleDavid Heinemeier Hansson2005-11-061-4/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made association extensions use simpler block syntaxDavid Heinemeier Hansson2005-11-062-11/+42
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2895 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2915@asus: jeremy | 2005-11-06 05:02:53 -0800Jeremy Kemper2005-11-063-44/+71
| | | | | | | 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
* Fixed that SQL Server should ignore :size declarations on anything but ↵David Heinemeier Hansson2005-11-061-1/+10
| | | | | | integer and string in the agnostic schema representation (closes #2756) [Ryan Tomayko] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2887 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added extension capabilities to has_many and has_and_belongs_to_many proxies ↵David Heinemeier Hansson2005-11-044-24/+78
| | | | | | [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
* Omit internal dtproperties table from SQLServer table list. Closes #2729.Jeremy Kemper2005-11-041-5/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2869 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quote column names in generated SQL. Closes #2728.Jeremy Kemper2005-11-041-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2866 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct the pure-Ruby MySQL 4.1.1 shim's version test. Closes #2718.Jeremy Kemper2005-11-031-13/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Model.create! to match existing model.save! method. When save! raises ↵Jeremy Kemper2005-11-031-35/+65
| | | | | | 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
* Correct fixture behavior when table name pluralization is off. Closes #2719.Jeremy Kemper2005-11-031-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added extension capabilities to has_many and has_and_belongs_to_many proxies ↵David Heinemeier Hansson2005-11-032-6/+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-12/+11
| | | | | | 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
* A missing primary key column shouldn't raise an error when generating its ↵Jeremy Kemper2005-11-011-1/+1
| | | | | | error message. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2837 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that an DuplicateMigrationVersionError gets raised when multiple ↵Florian Weber2005-10-311-4/+17
| | | | | | 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-302-10/+11
| | | | | | 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-293-188/+289
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Worked around that connection can't be reset if allow_concurrency is off. ↵Jeremy Kemper2005-10-291-0/+1
| | | | | | Closes #2648. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2816 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed SQL Server adapter so it honors options[:conditions] when applying ↵David Heinemeier Hansson2005-10-282-14/+28
| | | | | | :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
* Added migration support to SQL Server adapter (please someone do the same ↵David Heinemeier Hansson2005-10-283-6/+90
| | | | | | for Oracle and DB2) (closes #2625) [Tom Ward] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2778 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3801@sedna: jeremy | 2005-10-28 00:42:28 -0700Jeremy Kemper2005-10-281-2/+2
| | | | | | | Use AR::Base silencing rather than AR::Base.logger silencing in fixtures to preserve Log4r compatibility. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2775 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3800@sedna: jeremy | 2005-10-28 00:39:05 -0700Jeremy Kemper2005-10-282-10/+17
| | | | | | | 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
* Update documentation for observers to reflect new configuration system.Marcel Molina2005-10-271-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2766 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor DB exceptions and deal more with DB2 (closes #2624)David Heinemeier Hansson2005-10-274-3/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add exception to example (closes #2315)David Heinemeier Hansson2005-10-261-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2752 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :offset and :limit to the kinds of options that Base.constrain can use ↵David Heinemeier Hansson2005-10-261-1/+4
| | | | | | (closes #2466) [duane.johnson@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix docs (closes #2491)David Heinemeier Hansson2005-10-2611-55/+56
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed handling of nil number columns on Oracle and cleaned up tests for ↵David Heinemeier Hansson2005-10-261-7/+43
| | | | | | 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-261-0/+8
| | | | | | tests for DB2 (closes #2493) [maik schmidt] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2739 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Prepared for release of 0.14.2 (RC3)David Heinemeier Hansson2005-10-251-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2737 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow symbols to rename columns when using SQLite adapter. #2531 ↵Jamis Buck2005-10-251-4/+6
| | | | | | [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-252-110/+79
| | | | | | | | | | | | | | | | | | | 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
* Minor documentation fixFlorian Weber2005-10-251-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2726 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2727@asus: jeremy | 2005-10-24 14:14:36 -0700Jeremy Kemper2005-10-241-9/+8
| | | | | | | 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-1/+1
| | | | | | | 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-231-90/+115
| | | | | | | | | | | 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
* Map Active Record time to SQL TIME. Closes #2576.Jeremy Kemper2005-10-231-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2713 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Map AR time to PostgreSQL TIME. Closes #2575.Jeremy Kemper2005-10-231-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2712 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Clarify semantics of ActiveRecord::Base#respond_to? Closes #2560.Jeremy Kemper2005-10-221-13/+26
| | | | 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-1/+1
| | | | 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-202-3/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2694 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made ready to push RC2David Heinemeier Hansson2005-10-191-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2684 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Parenthesize :conditionsJeremy Kemper2005-10-185-10/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de