Michael Koziarski
eccf39203f
Correct syntax error in postgresql schema definition
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3868 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-15 01:31:00 +00:00
Jamis Buck
b95b09f32d
a few more tests for the custom counter_cache naming code
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3826 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-09 18:11:41 +00:00
Jamis Buck
87898badba
Allow counter_cache to accept a column name
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3825 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-09 17:23:57 +00:00
David Heinemeier Hansson
4f00c70580
Fixed eager loading problems with single-table inheritance [Rick Olson] 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
2006-03-05 18:43:56 +00:00
David Heinemeier Hansson
3dcf7fe4e9
Fixed that Date was in incorrect format in tasks.yml ( closes #4072 ) [mlaster@metavillage.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3758 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-04 17:17:43 +00:00
Jamis Buck
964b67dd0e
Make counter_cache work with polymorphic belongs_to
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3756 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-04 15:11:17 +00:00
David Heinemeier Hansson
b0245a57d6
No longer needed ( closes #4017 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3742 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-02 02:54:34 +00:00
David Heinemeier Hansson
6a3f4c932a
Added Sybase database adapter that relies on the Sybase Open Client bindings (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
2006-03-02 01:15:41 +00:00
David Heinemeier Hansson
631181ca18
Renamed the "oci" adapter to "oracle", but kept the old name as an alias ( closes #4017 ) [schoenm@earthlink.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-01 16:01:53 +00:00
Jeremy Kemper
1b3bae967d
Add missing fixtures for #3937 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3700 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-28 17:46:16 +00:00
David Heinemeier Hansson
b56cac56dd
Added new column to all db definitions. Where, oh where, is our hereo that will convert all the legacy fixture schemas to schema.rb? ( closes #3993 ) [Bob Silva]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3695 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-28 04:23:44 +00:00
Nicholas Seckar
ada11d6313
Add set_fixture_class to allow the use of table name accessors with models which use set_default_name. Closes #3935
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3690 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 20:29:28 +00:00
David Heinemeier Hansson
c350291ae7
Fixed that reflections would bleed across class boundaries in single-table inheritance setups ( closes #3796 ) [lars@pind.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3650 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:32:24 +00:00
David Heinemeier Hansson
99307b959b
Added calculations: Base.count, Base.average, Base.sum, Base.minimum, Base.maxmium, and the generic Base.calculate. All can be used with :group and :having. Calculations and statitics need no longer require custom SQL. #3958 [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:06:04 +00:00
Jeremy Kemper
c7d6d68f91
Reflections don't attempt to resolve module nesting of association classes. Simplify type computation.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-22 18:44:14 +00:00
David Heinemeier Hansson
7a2ce50a93
Improved the Oracle OCI Adapter with better performance for column reflection (from #3210 ), fixes to migrations (from #3476 and #3742 ), tweaks to unit tests (from #3610 ), and improved documentation (from #2446 ) ( closes #3879 ) [Aggregated by schoenm@earthlink.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-21 00:00:29 +00:00
Michael Koziarski
b9a9893d2b
Fix Syntax error in mysql.sql, Drop table readers and run aaa_create_tables first. [Bob Silva] Closes #3798
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3568 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-10 21:32:25 +00:00
Michael Koziarski
06170516c3
Add missing models and fixture
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3567 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-10 06:53:34 +00:00
Michael Koziarski
5f4b66201e
Allow has_many :through to work with :include [Michael Schoen]. Closes #3611
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3566 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-10 05:19:41 +00:00
Jeremy Kemper
d424674f1b
SQL Server cannot sort on type text. This causes three errors in the activerecord test suite, where tests sort on the comments.body or posts.body columns. This patch changes these columns from text to varchar(4096), allowing these tests to proceed (and pass). All activerecord tests now pass under sqlserver. References #3581 . [Tom Ward]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3559 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 19:41:32 +00:00
Jeremy Kemper
b3065a51a9
Polymorphic join support for has_one associations (has_one :foo, :as => :bar). Closes #3785 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3558 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 19:37:05 +00:00
Jeremy Kemper
5991e5c789
PostgreSQL: correctly parse negative integer column defaults. References #3776 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3554 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 18:06:29 +00:00
Marcel Molina
297618bddc
Make dynamic finders honor additional passed in :conditions. Closes #3569 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3463 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-22 09:34:41 +00:00
David Heinemeier Hansson
1facce6c24
allow has_many :through to work with custom :foreign key ( closes #3422 ) [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3456 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-21 23:40:20 +00:00
Jamis Buck
f9c13e6134
Add a test to verify correct behavior when creating a polymorphic association
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3440 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-20 21:51:48 +00:00
Michael Koziarski
a471e6b4d7
allow the 'lock_version' column to be configured with set_locking_column. Closes #3402
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3422 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-14 09:36:52 +00:00
Marcel Molina
a5708b4c1f
Multiple enhancements and adjustments to DB2 adaptor. Closes #3377 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3380 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-04 04:17:23 +00:00
Marcel Molina
bbec3ae512
Sanitize scoped conditions.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3379 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-04 03:43:28 +00:00
Tobias Lütke
581f12b7b1
removed :piggyback in favor of just allowing :select on :through associations
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-20 21:26:27 +00:00
Tobias Lütke
1d2c6ee8f3
added :piggyback option to has_many :through relationships to pick up values from the join table as needed
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3323 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-20 20:32:47 +00:00
Tobias Lütke
5f06c483ca
Fixed :through relations when using STI inherited classes would use the inherited class's name as foreign key on the join model
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3315 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-16 23:24:58 +00:00
David Heinemeier Hansson
e5d9ad3e29
Added option inheritance for find calls on has_and_belongs_to_many and has_many assosociations [DHH] Added option to specify :group, :limit, :offset, and :select options from find on has_and_belongs_to_many and has_many assosociations [DHH]
...
Added form_remote_for (form_for meets form_remote_tag) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3287 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-13 00:39:51 +00:00
David Heinemeier Hansson
6427db6baa
Added tests for join models and fixed a bug #3177
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3279 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-11 18:06:51 +00:00
Jeremy Kemper
d496db1388
Reloading an instance refreshes its aggregations as well as its associations. References #3024 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3242 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:46:57 +00:00
Jeremy Kemper
c1537e89f8
PostgreSQL: more robust sequence name discovery. References #3087 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3235 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:34:26 +00:00
David Heinemeier Hansson
6abda696b5
Added preliminary support for join models [DHH] Added preliminary support for polymorphic associations [DHH] Refactored associations to use reflections to get DRYer, beware, major refactoring -- double check before deploying anything with this (all tests pass, but..)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-03 04:29:55 +00:00
David Heinemeier Hansson
57b7532b91
Work-in progress for providing better join model support and polymorphic associations
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3209 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-02 06:03:43 +00:00
Jeremy Kemper
9cb02c5317
r3116@asus: jeremy | 2005-11-16 00:17:06 -0800
...
Introducing the Firebird adapter. Closes #1874 .
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3052 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-16 08:18:13 +00:00
Jeremy Kemper
2076dca63f
r3095@asus: jeremy | 2005-11-15 22:40:51 -0800
...
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
2005-11-16 08:16:54 +00:00
Jeremy Kemper
d28e9aef5f
Oracle: test case for column default parsing. References #2788 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3019 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 04:51:54 +00:00
Jeremy Kemper
b84a7beb98
acts_as_list plays nicely with inheritance by remembering the class which declared it. Closes #2811 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2964 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-10 06:19:50 +00:00
David Heinemeier Hansson
bc7ec23f4e
Fixed acts_as_list for definitions without an explicit :order #2803 [jonathan@bluewire.net.nz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2951 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-09 12:50:35 +00:00
Jeremy Kemper
35b4bdcff0
Destroy associated has_and_belongs_to_many records after all before_destroy 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
2005-11-08 10:19:09 +00:00
Jeremy Kemper
5298f730bb
Add :order option to Author.posts_with_comments_and_categories so that tests 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
2005-11-08 04:36:37 +00:00
David Heinemeier Hansson
49c801b71d
Added :include as an option for association declarations [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-06 20:39:34 +00:00
David Heinemeier Hansson
c8dd66fdcd
Made association extensions use simpler block syntax
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2895 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-06 19:05:42 +00:00
David Heinemeier Hansson
a5a82d978b
Added extension capabilities to has_many and has_and_belongs_to_many proxies [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
2005-11-04 19:39:50 +00:00
Jeremy Kemper
56ade75131
Explicitly require topic from reply fixture.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2867 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-04 05:46:28 +00:00
David Heinemeier Hansson
8c512a1caf
Added extension capabilities to has_many and has_and_belongs_to_many proxies [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2861 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-03 09:06:42 +00:00
Florian Weber
d5859d0b17
Added that an DuplicateMigrationVersionError gets raised when multiple migrations have the same version number.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2832 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-31 15:43:02 +00:00