aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/base_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a few Oracle issues: Allows Oracle's odd date handling to still work ↵David Heinemeier Hansson2006-07-051-1/+1
| | | | | | consistently within #to_xml, Passes test that hardcode insert statement by dropping the :id column, Updated RUNNING_UNIT_TESTS with Oracle instructions, Corrects method signature for #exec #5294 [schoenm@earthlink.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4552 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: support microsecond time resolution. Closes #5492.Jeremy Kemper2006-06-251-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4494 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change AR::Base#to_param to return a String instead of a Fixnum. Closes #5320.Nicholas Seckar2006-06-191-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4459 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactored ActiveRecord::Base.to_xml to become a delegate for XmlSerializer, ↵David Heinemeier Hansson2006-06-041-11/+11
| | | | | | which restores sanity to the mega method. This refactoring also reinstates the opinions that type="string" is redundant and ugly and nil-differentiation is not a concern of serialization [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4431 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed usage of :limit and with_scope when the association in scope is a 1:m ↵David Heinemeier Hansson2006-06-031-0/+8
| | | | | | (closes #5208) [alex@purefiction.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4422 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* to_xml fixes, features, and speedup. Closes #4989.Jeremy Kemper2006-06-031-23/+23
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fixtures :accounts for base_test. Closes #5268.Jeremy Kemper2006-06-021-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Base.find :all, :conditions => [ "id IN (?)", collection ] would ↵David Heinemeier Hansson2006-06-011-2/+2
| | | | | | fail if collection was empty [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4390 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Array#to_s(:db) that'll produce a comma-separated list of ids [DHH] ↵David Heinemeier Hansson2006-05-311-0/+8
| | | | | | Split Grouping into its own file git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4387 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow AR::Base#to_xml to include methods too. Closes #4921. ↵Marcel Molina2006-04-291-0/+6
| | | | | | [johan@textdrive.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4314 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add support for FrontBase (http://www.frontbase.com/) with a new adapter ↵Marcel Molina2006-04-271-6/+6
| | | | | | thanks to the hard work of one Mike Laster. Closes #4093. [mlaster@metavillage.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4291 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add support for :order option to with_scope. Closes #3887. ↵Marcel Molina2006-04-261-0/+23
| | | | | | [eric.daspet@survol.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4274 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that that multiparameter assignment doesn't work with aggregations ↵David Heinemeier Hansson2006-04-061-0/+9
| | | | | | (closes #4620) [Lars Pind] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix type_name_with_module to handle type names that begin with '::'. Closes ↵Nicholas Seckar2006-04-061-0/+5
| | | | | | #4614. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4187 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed DB2 adapter so nullable columns will be determines correctly now and ↵David Heinemeier Hansson2006-03-221-2/+2
| | | | | | quotes from column default values will be removed (closes #4350) [contact@maik-schmidt.de] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4013 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix bug introduced by changeset 3679 which caused custom attribute? methods ↵David Heinemeier Hansson2006-03-201-2/+3
| | | | | | to be overridden. Also ensure that ? methods are defined even if read method is customised. (closes #3677) [jonathan@bluewire.net.nz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4002 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* add support for COUNT(DISTINCT id) queries in sqlite2 (closes #4300) [Rick ↵Rick Olson2006-03-191-3/+1
| | | | | | Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3979 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* skip count_by_sql test using COUNT(DISTINCT) for sqlite2 onlyRick Olson2006-03-191-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3978 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix boolean testDavid Heinemeier Hansson2006-03-191-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3977 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQL Server adapter gets some love (closes #4298) [rtomayko@gmail.com]David Heinemeier Hansson2006-03-181-2/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3949 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove broken attempts at handling columns with a a default of 'now()' in ↵Michael Koziarski2006-03-181-11/+0
| | | | | | the postgresql adapter. Closes #2257 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added migrations support to the Sybase adapter (closes #4293) [John R. Sheets]David Heinemeier Hansson2006-03-181-2/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle adapter gets some love #4230 [schoenm@earthlink.net]David Heinemeier Hansson2006-03-161-2/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.abstract_class? that marks which classes are not part of the ↵Rick Olson2006-03-161-2/+7
| | | | | | Active Record hierarchy. closes #3704 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3882 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* make save! return true on success[johan@johansorensen.com]. Closes #4173Michael Koziarski2006-03-151-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3871 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Unit test fixes for postgresql.Michael Koziarski2006-03-151-2/+4
| | | | | | | | Allow to_xml tests to pass in time zones other than CST. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3870 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added options to control the :only/:except for included associations on ↵David Heinemeier Hansson2006-03-101-0/+11
| | | | | | Base#to_xml [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3832 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added association inclusion in to_xml [DHH]David Heinemeier Hansson2006-03-101-5/+43
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3831 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed to_xml across the board to use nice indention, better skip_attributes ↵David Heinemeier Hansson2006-03-091-0/+28
| | | | | | workings, no type on strings, and cleaned tests [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3829 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* added assert_queries for the AR test suiteRick Olson2006-03-051-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3784 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed eager loading problems with single-table inheritance [Rick Olson] ↵David Heinemeier Hansson2006-03-051-2/+2
| | | | | | Added smarter table aliasing for eager associations for multiple self joins [Rick Olson] (closes #3580) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Sybase database adapter that relies on the Sybase Open Client bindings ↵David Heinemeier Hansson2006-03-021-5/+13
| | | | | | (see http://raa.ruby-lang.org/project/sybase-ctlib) (closes #3765) [John Sheets] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3734 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Renamed the "oci" adapter to "oracle", but kept the old name as an alias ↵David Heinemeier Hansson2006-03-011-5/+5
| | | | | | (closes #4017) [schoenm@earthlink.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Define attribute query methods to avoid method_missing calls. Closes #3677.Jeremy Kemper2006-02-271-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3679 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :count option to pagination that'll make it possible for the ↵David Heinemeier Hansson2006-02-201-2/+22
| | | | | | ActiveRecord::Base.count call to using something else than * for the count. Especially important for count queries using DISTINCT #3839 [skaes]. Added :select option to Base.count that'll allow you to select something else than * to be counted on. Especially important for count queries using DISTINCT (closes #3839) [skaes]. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3620 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* * Fix pagination problems when using includeMichael Koziarski2006-02-091-0/+7
| | | | | | | | | | * Introduce Unit Tests for pagination * Allow count to work with :include by using count distinct. [Kevin Clark & Jeremy Hopple] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3553 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added assert_date_from_db to do cleaner tests for SQL Server (closes #3557) ↵David Heinemeier Hansson2006-01-211-8/+2
| | | | | | [Tom Ward] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3452 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add AR::Base.base_class for querying the ancestor AR::Base subclass [Jamis Buck]Jamis Buck2006-01-201-1/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3439 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix test error caused by operator error with last commitMichael Koziarski2006-01-141-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3418 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't alter the Hash passed to attributes=, closes #3385Michael Koziarski2006-01-141-2/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3417 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sanitize scoped conditions.Marcel Molina2006-01-041-11/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3379 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use query methods rather than readers in boolean tests for [3092]. ↵Jeremy Kemper2005-11-191-4/+4
| | | | | | References #2945. Closes #2949. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3094 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct boolean handling in generated reader methods. References #2945.Jeremy Kemper2005-11-191-0/+34
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3092 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't generate read methods for columns whose names are not valid ruby ↵Jeremy Kemper2005-11-191-0/+7
| | | | | | method names. References #2946. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3095@asus: jeremy | 2005-11-15 22:40:51 -0800Jeremy Kemper2005-11-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Ticket #1874 - Firebird adapter r3107@asus: jeremy | 2005-11-16 00:06:14 -0800 quote column aliases r3108@asus: jeremy | 2005-11-16 00:08:12 -0800 quote columns in construct_conditions_from_arguments. update sequence_name docs. introduce prefetched primary keys. r3109@asus: jeremy | 2005-11-16 00:09:08 -0800 double-quote rather than single-quote sqlite columns r3110@asus: jeremy | 2005-11-16 00:09:56 -0800 quote column names and use attribute_condition in validates_uniqueness_of r3111@asus: jeremy | 2005-11-16 00:12:24 -0800 Use QUOTED_TYPE constant in tests r3112@asus: jeremy | 2005-11-16 00:13:28 -0800 restrict test_inserts_with_pre_and_suffix to those adapters which support migrations r3113@asus: jeremy | 2005-11-16 00:14:09 -0800 Use QUOTED_TYPE constant in tests r3114@asus: jeremy | 2005-11-16 00:14:30 -0800 Use QUOTED_TYPE constant in tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: test case for column default parsing. References #2788.Jeremy Kemper2005-11-141-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3019 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4325@asus: jeremy | 2005-11-12 03:57:46 -0800Jeremy Kemper2005-11-121-3/+3
| | | | | | | PostgreSQL: correctly discover custom primary key sequences. PostgreSQL: smarter sequence name defaults, stricter last_insert_id, warn on pk without sequence. Base.reset_sequence_name analogous to reset_table_name (mostly useful for testing). Base.define_attr_method allows nil values. References #2594. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2985 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2915@asus: jeremy | 2005-11-06 05:02:53 -0800Jeremy Kemper2005-11-061-5/+5
| | | | | | | 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
* 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 migration support for Oracle (closes #2647) [Michael Schoen]David Heinemeier Hansson2005-10-291-5/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de