Jeremy Kemper
a72c1ec43e
Refactor association create and build so before & after callbacks behave consistently. Closes #8854 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-16 05:07:58 +00:00
Jeremy Kemper
9b6207c3d0
Quote table names. Defaults to column quoting. Closes #4593 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7932 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-16 05:06:33 +00:00
Jeremy Kemper
197c888576
Moving SQL Server tests to the extracted adapter. References #9884 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7930 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-16 05:05:22 +00:00
Tobias Lütke
0ad5365bf4
find_and_(initialize|create)_by methods can now properly initialize protected attributes
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7826 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-10 19:11:50 +00:00
Michael Koziarski
1c881ca5bf
Ensure that 'autosaving' works when associations aren't loaded [Bryan Helmkamp] References #8713
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7824 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-10 06:45:13 +00:00
Michael Koziarski
3122d321fd
Make sure AR::Base#clone handles attr changes made in after_initialize hooks. Closes #7191 [weyus]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7802 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 06:21:38 +00:00
Jeremy Kemper
4eaa8ba5be
PostgreSQL: support multiline default values. Closes #7533 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7801 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 06:17:53 +00:00
Michael Koziarski
8ef4bc6c75
Missed the add
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 01:03:19 +00:00
Michael Koziarski
638505b90f
Send the correct INSERT statement when dealing with objects with only primary keys. Closes #9523 [tarmo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7753 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 00:49:58 +00:00
Rick Olson
24c2457a26
Don't call attr_readonly on polymorphic belongs_to associations, in case it matches the name of some other non-ActiveRecord class/module. [Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-05 19:27:33 +00:00
David Heinemeier Hansson
e86d1cd621
Added ActiveRecord::Base#to_json/from_json (currently does not support :include like to_xml) [DHH]. Added ActiveRecord::Base#from_xml [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-20 23:22:30 +00:00
Jeremy Kemper
81d619ea0d
Associations macros accept extension blocks alongside modules. Closes #9346 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7504 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-17 21:19:44 +00:00
Michael Koziarski
acbec3e565
Ensure that custom mutators aren't redefined by define_attribute_methods. [Koz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7500 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-17 09:29:02 +00:00
Jeremy Kemper
f7c371dff8
OpenBase: update for new lib and latest Rails. Support migrations. Closes #8748 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7472 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-13 23:21:14 +00:00
David Heinemeier Hansson
ea0975a20b
Moved acts_as_tree into a plugin of the same name on the official Rails svn ( closes #9514 ) [lifofifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7454 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-11 03:25:59 +00:00
David Heinemeier Hansson
11f4d28344
Moved acts_as_nested_set into a plugin of the same name on the official Rails svn ( closed #9516 ) [josh]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7453 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-11 03:09:37 +00:00
Michael Koziarski
aa36ca1c5f
Remove acts_as_list. Users are advised to install the new plugin. References #9415 . [josh, nzkoz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7444 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-10 04:41:09 +00:00
Michael Koziarski
29b0707f07
Improve performance and functionality of the postgresql adapter. Closes #8049 [roderickvd]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7329 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-08-16 06:26:30 +00:00
Michael Koziarski
82b244e3ff
Make sure has_many associations honour :include when counting. Closes #9167 [danger]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-08-16 04:36:55 +00:00
Michael Koziarski
d4bf5e9b34
Make habtm respect the :select option. Closes #9207 . [Aleksey Kondratenko]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7279 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-08-07 09:53:33 +00:00
Michael Koziarski
d0ff4ec193
Don't call unsupported methods on associated objects when using :include, :method with to_xml [manfred, jwilger] Closes #7307
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-30 03:31:48 +00:00
Jeremy Kemper
89c79b8b95
Fix polymorphic has_one associations declared in an abstract class. Closes #8638 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7119 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-25 22:42:19 +00:00
Jeremy Kemper
b2681cca2e
acts_as_nested_set: direct_children is sorted correctly. Closes #4761 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6903 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-30 06:34:25 +00:00
Rick Olson
c57c7210cd
Ensure that associations with :dependent => :delete_all respect :conditions option. Closes #8034 [danger, joshpeek, Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-24 20:39:51 +00:00
Rick Olson
f6edfa3553
forgot binary fixture
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6801 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-21 19:50:44 +00:00
Rick Olson
e3dab67c44
Allow a polymorphic :source for has_many :through associations. Closes #7143 [protocool]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6408 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-13 05:23:18 +00:00
Jeremy Kemper
98165fd31e
Consistently quote primary key column names. Closes #7763 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6364 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-09 03:23:37 +00:00
Jeremy Kemper
49d1f6a813
Fixtures: fix YAML ordered map support. Closes #2665 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-09 02:06:50 +00:00
Jeremy Kemper
0e8c3b8dd9
Fix has_many :through << with custom foreign keys. Closes #6466 , #7153 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6336 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-05 11:34:39 +00:00
Jeremy Kemper
b2c0359b3e
SQLServer: recognize real column type as Ruby float, correctly schema-dump 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
2007-03-03 14:20:57 +00:00
David Heinemeier Hansson
87b7b5b3e7
Added fixtures :all to test_helper.rb to assume that most people just want 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
2007-02-25 17:31:43 +00:00
Jeremy Kemper
269ad9711d
MySQL: blob and text columns may not have defaults in 5.x. Update fixtures schema for strict mode. Closes #6695 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6074 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 15:45:06 +00:00
Jeremy Kemper
06afb8c746
Subclasses of an abstract class work with single-table inheritance. References #5704 , closes #7284 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6013 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-23 04:19:16 +00:00
Jeremy Kemper
e310344111
Oracle: create_table takes a :sequence_name option to override the 'tablename_seq' default. Closes #7000 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5933 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-15 00:34:43 +00:00
Jeremy Kemper
9073cef866
SQLServer: handle [quoted] table names. Closes #6635 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-12 05:44:28 +00:00
Jeremy Kemper
8d3ff3abc7
acts_as_nested_set works with single-table inheritance. Closes #6030 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-12 05:33:09 +00:00
Jeremy Kemper
353238b6a4
Inline primary keys.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-12 04:58:08 +00:00
Michael Koziarski
84481dd3b4
Sybase adapter fixes. Closes #6926 [jsheets]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5839 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-05 00:12:06 +00:00
Jeremy Kemper
5f18fd93de
utf8 mysql topics table
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5749 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-19 18:04:42 +00:00
Jeremy Kemper
8ffb22056c
Subclasses of an abstract class work with single-table inheritance. Closes #5704 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-01 21:24:47 +00:00
Jeremy Kemper
19c99acfbc
MySQL: detect when a NOT NULL column without a default value is misreported as default ''. Can't detect for string, text, and binary columns since '' is a legitimate default. Closes #6156 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 08:54:42 +00:00
Jeremy Kemper
50ee332c4a
Cleanup SQLite AUTOINCREMENT: exclude sqlite_sequence table, factor out feature availability check.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-14 03:32:16 +00:00
Jeremy Kemper
70840d4b7f
Oracle: resolve test failures, use prefetched primary key for inserts, check for null defaults. Factor out some common methods from all adapters. Closes #6515 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-01 20:28:48 +00:00
Rick Olson
cdb5132c41
Fix has_many :through to add the appropriate conditions when going through an association using STI. Closes #5783 . [Jonathan Viney]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5305 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-15 16:37:11 +00:00
Rick Olson
8e3bf70bcd
Removes the ability for eager loaded conditions to be interpolated, since there is no model instance to use as a context for interpolation. #5553 [turnip@turnipspatch.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5264 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-09 02:46:57 +00:00
David Heinemeier Hansson
9fd88d7939
Deprecated add_on_boundary_breaking (use validates_length_of instead) ( closes #6292 ) [BobSilva]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5255 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-09 01:42:09 +00:00
Jeremy Kemper
3f1acf49bd
Deprecation tests. Remove warnings for dynamic finders and for the foo_count ethod if it's also an attribute.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5116 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-15 07:02:05 +00:00
Jeremy Kemper
528618a910
Optimistic locking: gracefully handle nil versions, treat as zero. Closes #5908 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-04 00:02:38 +00:00
Jeremy Kemper
d0696d7641
to_xml: the :methods option works on arrays of records. Closes #5845 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4909 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-02 21:00:09 +00:00
Jeremy Kemper
667d8ea2ea
Commit stray fixture.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-02 02:51:01 +00:00
Jeremy Kemper
b1257d96b7
has_many :through conditions are sanitized by the associating class. Closes #5971 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-01 05:31:56 +00:00
Jeremy Kemper
3704088ebd
has_one supports the :dependent => :delete option which skips the typical callback chain and deletes the associated object directly from the database. Closes #5927 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4848 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-29 17:06:27 +00:00
Jeremy Kemper
842ce34bbc
Fixtures: correct escaping of \n and \r. Closes #5859 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-24 01:50:24 +00:00
Jeremy Kemper
8cbe22ab51
Migrations: gracefully handle missing migration files. Closes #5857 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4809 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-23 05:49:40 +00:00
Jeremy Kemper
32dcfa6913
MySQL: update test schema for MySQL 5 strict mode. Closes #5861 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4808 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-23 05:30:14 +00:00
Jeremy Kemper
50be89b609
Shorten index name.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4777 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-16 18:22:51 +00:00
Jeremy Kemper
7aaf4867d2
Included associations: go deep.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-16 18:10:52 +00:00
Jeremy Kemper
d7f780e066
Fix for deep includes on the same association.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4758 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-14 07:19:47 +00:00
Jeremy Kemper
2a12b56841
r4704@asus: jeremy | 2006-06-27 12:00:19 -0700
...
decimal
r4705@asus: jeremy | 2006-06-27 12:20:47 -0700
current_adapter? checks whether any of its arguments is the name of the current adapter class
r4834@asus: jeremy | 2006-07-08 13:08:24 -0700
Room to float.
r4835@asus: jeremy | 2006-07-08 13:09:18 -0700
Give lock test a few chances.
r4836@asus: jeremy | 2006-07-08 13:12:05 -0700
Numeric and decimal columns map to BigDecimal instead of Float. Those with scale 0 map to Integer. Closes #5454 .
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-08 20:35:56 +00:00
Jeremy Kemper
a3f459eecf
Firebird migrations support. Closes #5337 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4594 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-08 17:13:21 +00:00
Jeremy Kemper
c4233a0eae
PostgreSQL: correctly quote microseconds in timestamps. Closes #5641 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4579 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-07 17:40:22 +00:00
Jeremy Kemper
42775686d2
PostgreSQL: support microsecond time resolution. Closes #5492 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4494 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-25 18:04:06 +00:00
David Heinemeier Hansson
9c0fb70e1e
For Firebird adapter
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4423 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:52:22 +00:00
David Heinemeier Hansson
6a9f47f33f
Make more Firebird tests pass ( closes #5188 ) [kennethkunz@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4420 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:47:29 +00:00
Jeremy Kemper
48052d70ec
to_xml fixes, features, and speedup. Closes #4989 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 00:01:08 +00:00
Rick Olson
ea51d72edb
Provide Association Extensions access to the instance that the association is being accessed from. Closes #4433 [josh@hasmanythrough.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4372 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-28 21:33:34 +00:00
David Heinemeier Hansson
59c8c63ecd
Added :allow_nil option for aggregations ( closes #5091 ) [ian.w.white@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4353 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-21 17:32:37 +00:00
Marcel Molina
d22f9c9488
Fix Oracle boolean support and tests. Closes #5139 . [schoenm@earthlink.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4351 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-21 15:13:28 +00:00
Jeremy Kemper
d59f3a78a4
uniq preserves order. References [4325].
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-07 02:03:25 +00:00
Jeremy Kemper
50f538b72b
Allow :uniq => true with has_many :through associations.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-06 23:37:56 +00:00
Marcel Molina
3fec943aca
Allow AR::Base#to_xml to include methods too. Closes #4921 . [johan@textdrive.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4314 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-29 23:00:47 +00:00
Marcel Molina
f42403ff49
Remove duplicate fixture entry in comments.yml. Closes #4923 . [Blair Zajac <blair@orcaware.com>]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4305 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-29 05:02:54 +00:00
Marcel Molina
b2c0ddf033
Add support for FrontBase ( http://www.frontbase.com/ ) with a new adapter 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
2006-04-27 22:39:45 +00:00
Marcel Molina
9a5b91a329
Sybase Adapter type conversion cleanup [dev@metacasa.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-25 19:11:24 +00:00
Rick Olson
df7b74668e
Fix the HasManyAssociation#count method so it uses the new ActiveRecord::Base#count syntax, while maintaining backwards compatibility. [Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-19 21:37:54 +00:00
Rick Olson
7e76740d2a
Allow multiple association extensions with :extend option ( closes #4666 ) [Josh Susser]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-11 01:10:42 +00:00
David Heinemeier Hansson
8eb73f43e1
Fixed that that multiparameter assignment doesn't work with aggregations ( closes #4620 ) [Lars Pind]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-06 16:16:29 +00:00
Rick Olson
a9fb1544b0
Added support for eagerly including polymorphic has_one associations. ( closes #4525 ) [Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4170 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-05 17:01:56 +00:00
Rick Olson
4d232025b7
Added descriptive error messages for invalid has_many :through associations: going through :has_one or :has_and_belongs_to_many [Rick]
...
Added support for going through a polymorphic has_many association: (closes #4401 ) [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-05 15:36:02 +00:00
Rick Olson
38bae0a969
Change has_many :through to use the :source option to specify the source association. :class_name is now ignored. [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-24 14:46:17 +00:00
Rick Olson
6fbf408238
Allow overriding of find parameters in scoped has_many :through calls [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4007 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-21 16:33:22 +00:00
Rick Olson
c8470f8a5b
add self referential has_many :through example [Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4006 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-21 01:07:16 +00:00
David Heinemeier Hansson
1aff68d615
Fix bug introduced by changeset 3679 which caused custom attribute? methods 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
2006-03-20 06:45:34 +00:00
Rick Olson
9a72cd22cf
Don't classify the has_one class when eager loading, it is already singular. Add tests. ( closes #4117 ) [jonathan@bluewire.net.nz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3983 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-19 19:32:07 +00:00
Rick Olson
ea25e246e0
Quit ignoring default :include options in has_many :through calls [Mark James]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3974 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-19 16:13:52 +00:00
Rick Olson
fcd4c9529c
Allow has_many :through associations to find the source association by setting a custom class ( closes #4307 ) [jonathan@bluewire.net.nz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3973 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-19 07:14:48 +00:00
David Heinemeier Hansson
389a667664
Small pgsql fixes ( closes #4083 ) [pergesu@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3965 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-19 02:21:58 +00:00
Rick Olson
0925c6b6a0
Allow has_many :through to work on has_many associations ( closes #3864 ) [sco@scottraymond.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3964 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-19 02:01:40 +00:00
Rick Olson
57af961a80
Raise error when trying to select many polymorphic objects with has_many :through or :include ( closes #4226 ) [josh@hasmanythrough.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3961 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-19 00:53:24 +00:00
Rick Olson
9c9069a675
Fixed has_many :through to include :conditions set on the :through association. closes #4020 [jonathan@bluewire.net.nz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 23:14:31 +00:00
Rick Olson
fbd1e01bd6
Fix that has_many :through honors the foreign key set by the belongs_to association in the join model ( closes #4259 ) [andylien@gmail.com / Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3954 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 22:38:49 +00:00
David Heinemeier Hansson
9db8f3e57a
SQL Server adapter gets some love ( closes #4298 ) [rtomayko@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3949 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 21:27:40 +00:00
Jamis Buck
3257a4b9b0
Fix incorrect mysql column type (requires AR test DB to be rebuilt) ( closes #4299 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3943 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 20:33:00 +00:00
David Heinemeier Hansson
e18fad6c43
Update lingering uses of deprecated association dependency options ( closes #4169 ) [coffe2code]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3941 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 20:25:50 +00:00
Rick Olson
50103b86e6
fixed has_many :conditions sanitizing ( closes #4278 ) [hakuja@hakuja.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 18:01:50 +00:00
David Heinemeier Hansson
416385a09d
Added OpenBase database adapter that builds on top of the http://www.spice-of-life.net/ruby-openbase/ driver. All functionality except LIMIT/OFFSET is supported ( closes #3528 ) [derrickspell@cdmplus.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3932 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 16:50:25 +00:00
David Heinemeier Hansson
df97ed5e4c
Nicer error message on has_many :through when :through reflection can not be found ( closes #4042 ) [court3nay@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3910 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 03:39:18 +00:00
David Heinemeier Hansson
ea617708c2
Added migrations support to the Sybase adapter ( closes #4293 ) [John R. Sheets]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 03:02:32 +00:00
Rick Olson
a3502c419e
Use association's :conditions when eager loading. [jeremyevans0@gmail.com] closes #4144
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-16 06:17:54 +00:00
Rick Olson
a0c459bca7
fix test_find_in_association_with_options test, tweak other tests affected by developer/project addition
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3890 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-16 03:24:40 +00:00
Rick Olson
def746030c
Added Base.abstract_class? that marks which classes are not part of the Active Record hierarchy. closes #3704
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3882 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-16 02:46:01 +00:00
Rick Olson
0859779d6f
Allow :dependent options to be used with polymorphic joins. #3820 [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3881 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-16 02:10:11 +00:00
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
David Heinemeier Hansson
e508595cf7
Fixed SQL Server adapter so it honors options[:conditions] when applying :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
2005-10-28 09:20:05 +00:00
David Heinemeier Hansson
dd257a3ccb
Fixed handling of nil number columns on Oracle and cleaned up tests for Oracle in general #2555 [schoenm@earthlink.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2741 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-26 12:57:11 +00:00
David Heinemeier Hansson
85a7892644
Added quoted_true and quoted_false methods to db2_adapter and cleaned up tests for DB2 ( closes #2493 ) [maik schmidt]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2739 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-26 12:47:23 +00:00
Tobias Lütke
13fccff283
modified finder test a tiny bit so that it passes on sqlserver
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-16 20:50:06 +00:00
Jeremy Kemper
7117fdb8ce
r3616@asus: jeremy | 2005-09-26 23:09:28 -0700
...
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
2005-10-16 03:45:39 +00:00
Jeremy Kemper
da675e536d
Support ordered YAML fixtures. #1896
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2600 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-15 02:01:38 +00:00
Tobias Lütke
7086993161
Adds :nullify option to :depends. Closes #2015 (Robby Russell)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2595 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-15 00:46:55 +00:00
Marcel Molina
af0df03fd3
Update DB2 adapter. Closes #2206 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2546 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-12 23:42:54 +00:00
Marcel Molina
f0b2b637ea
Add test coverage for customized primary keys including a failing test for #2444 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2540 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-12 19:55:46 +00:00
Marcel Molina
e30699f660
Add geometric type for postgresql adapter. Closes #2233 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2498 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-09 00:52:25 +00:00
Jeremy Kemper
bcb50f3c89
sqlite topics.approved should default to true like the other dbs
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2480 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-06 21:52:47 +00:00
Jeremy Kemper
164625ca1f
Fixup tests for [2474].
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2478 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-06 17:13:24 +00:00
Jeremy Kemper
78d6cc085a
smallint -> boolean in pg sql
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2475 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-06 04:52:32 +00:00
Michael Koziarski
656fb866f9
Quote booleans according the rules defined by the adapter
...
* SQLite schema has been updated
* Postgresql schema needs to be fixed too
Simplify AR::Base#toggle to store the boolean, not the quoted value
* expand the tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-06 04:15:14 +00:00
Jeremy Kemper
efaf2af07c
r3653@asus: jeremy | 2005-09-28 00:23:49 -0700
...
Ticket 2221 - model.association.clear should destroy associated objects if :dependent => true instead of nullifying their foreign keys
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-28 03:52:57 +00:00
Jeremy Kemper
0bd11857ef
Ticket 2256 - Recognize PostgreSQL NOW() default as equivalent to CURRENT_TIMESTAMP/CURRENT_DATE
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2378 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-27 23:37:57 +00:00
Jeremy Kemper
79a535ecd7
r3589@asus: jeremy | 2005-09-26 16:58:40 -0700
...
Remove associations.png in favor of flower.jpg which reveals a bug in binary escaping.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-26 20:28:55 +00:00
Jeremy Kemper
b2c46ed5fd
Include the orders table in *.drop.sql
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2342 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-26 08:23:04 +00:00
Jamis Buck
ea65465422
Standardize the interpretation of boolean columns in the Mysql and Sqlite adapters. (Use MysqlAdapter.emulate_booleans = false to disable this behavior)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2335 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-25 15:49:35 +00:00
Jamis Buck
2a35baa0bb
Wrap :conditions in parentheses to prevent problems with OR's #1871
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-24 23:58:13 +00:00
David Heinemeier Hansson
4307d7ecbe
Fixed various problems with has_and_belongs_to_many when using customer finder_sql #2094 [Florian Weber]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-13 10:15:54 +00:00
David Heinemeier Hansson
4b53e26ef6
Fix fixture problem for pgsql
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-11 04:18:07 +00:00
David Heinemeier Hansson
e5cc729b18
Make the test_find_all_by_one_attribute and test_find_all_by_one_attribute_with_options tests not fail in SQL Server #2128 [Tom Ward]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2168 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-09 08:34:51 +00:00
David Heinemeier Hansson
b063067321
Added the instance methods #root and #ancestors on acts_as_tree and fixed siblings to not include the current node #2142 , #2140 [coffee2code]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2163 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-09 08:01:44 +00:00
Jamis Buck
dfe1aeb776
Saving a record with two unsaved belongs_to associations pointing to the same object fails #2023 [Tobias Luetke]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2040 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-23 11:05:04 +00:00
David Heinemeier Hansson
14ea312808
Made Oracle a first-class connection adapter by adhering closer to idiomatic Oracle style #1798 [The Gang of Oracles]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-24 14:01:35 +00:00
David Heinemeier Hansson
34f9d30e39
Added support for calling constrained class methods on has_many and has_and_belongs_to_many collections #1764 [Tobias Luetke]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 20:05:42 +00:00
Jamis Buck
83e2f6ae1e
Allow unspecified join-table columns to use to their default values when adding to a habtm collection
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1860 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-18 11:06:41 +00:00
David Heinemeier Hansson
9870396ed1
Fixed incompatibility in DB2 adapter with the new limit/offset approach #1718 [Maik Schmidt]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-17 09:52:00 +00:00
David Heinemeier Hansson
f1880cac58
Sugared up migrations with even more bling #1609 [Tobias Luekte]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-05 07:19:20 +00:00
Jeremy Kemper
c1efa54195
Include all tables in mysql, sqlite, and postgresql drop sql.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1695 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-05 05:07:49 +00:00
David Heinemeier Hansson
4180e57b70
Added callback hooks to association collections #1549 [Florian Weber]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 08:43:57 +00:00
David Heinemeier Hansson
df95128e94
Fixed that has_and_belongs_to_many didn't respect single table inheritance types #1081 [Florian Weber]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1641 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:52:59 +00:00
David Heinemeier Hansson
d9d22c7596
Fixed that single-table inheritance sub-classes couldn't be used to limit the result set with eager loading #1215 [Chris McGrath]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1619 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:21:22 +00:00
David Heinemeier Hansson
f2a29ca43c
Added support for ODBC connections to MS SQL Server so you can connect from a non-Windows machine #1569 [Mark Imbriaco/DeLynn Berry] Added support for limit/offset with the MS SQL Server driver so that pagination will now work #1569 [DeLynn Berry]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1583 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-01 17:20:04 +00:00
David Heinemeier Hansson
a2f26b971b
Fixed that adding a record to a has_and_belongs_to collection would always save it -- now it only saves if its a new record #1203 [Alisdair McDiarmid]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1453 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-18 05:28:59 +00:00
Jeremy Kemper
1d9905a67f
r1307@iwill: jeremy | 2005-06-13 19:05:00 -0700
...
Ticket 1312 - Malformed habtm finder sql
r1308@iwill: jeremy | 2005-06-13 19:58:48 -0700
Add a habtm with an unquoted condition to Project.
r1309@iwill: jeremy | 2005-06-13 19:59:46 -0700
Space out habtm finder conditions.
r1310@iwill: jeremy | 2005-06-13 20:00:16 -0700
Test habtm.find with quoted and unquoted conditions.
r1311@iwill: jeremy | 2005-06-13 20:00:25 -0700
Update changelog
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1414 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-13 21:51:43 +00:00
Jamis Buck
37a370d8d4
Be sure to use the @finder_sql in the has_many association's #find method, even if explicit conditions have not been given.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-13 12:03:33 +00:00
Jeremy Kemper
1fde44bfee
r1278@iwill: jeremy | 2005-06-12 05:11:48 -0700
...
Branch for PostgreSQL schema. Ticket #827 .
r1281@iwill: jeremy | 2005-06-12 19:06:43 -0700
remove search_path from PostgreSQL db definition
r1282@iwill: jeremy | 2005-06-12 19:07:50 -0700
Rakefile support for database-specific tests.
r1283@iwill: jeremy | 2005-06-12 19:10:18 -0700
Add schema_search_path attribute to PostgreSQL adapter. Replace table_structure with column_definitions which finds the given table_name in the schema search path.
r1284@iwill: jeremy | 2005-06-12 19:12:10 -0700
Unit test PostgreSQL schema search path.
r1285@iwill: jeremy | 2005-06-12 19:12:20 -0700
Changelog entry.
r1286@iwill: jeremy | 2005-06-12 20:08:20 -0700
Don't try to quote schema names. Include a reference to the PostgreSQL schema docs.
r1287@iwill: jeremy | 2005-06-12 20:16:07 -0700
SchemasTest -> SchemaTest
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1407 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-12 22:05:30 +00:00
Jeremy Kemper
d0bd3b5af4
Return PostgreSQL columns in the order they are declared #1374 (perlguy@gmail.com). Unit test column order, adapter housekeeping, simplify users of columns_hash.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1405 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-12 06:56:51 +00:00
Jeremy Kemper
cd033c63c2
Preserve extendedWarranty case in PostgreSQL computers table.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1401 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-11 20:26:07 +00:00
Jamis Buck
2c0fa32088
Do not use instantiated fixtures (in general) in tests. Also, support the use of transactional fixtures by setting the AR_TX_FIXTURES environment variable to "yes".
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-10 14:58:02 +00:00
Jamis Buck
7f9ffb2ebf
Eager loading of dependent has_one associations won't delete the association #1212 . Also, starting to refactor the tests to make them speedier, with optional support for transactional fixtures.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-10 13:54:58 +00:00
David Heinemeier Hansson
190e04645b
Fixed that :delete_sql in has_and_belongs_to_many associations couldn't access record properties #1299 [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1313 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-19 17:07:56 +00:00
David Heinemeier Hansson
bd79a4eb3b
Fixed that clone would break when an aggregate had the same name as one of its attributes #1307 [bitsweat]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1309 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-19 16:39:50 +00:00
David Heinemeier Hansson
2bf223051e
Added compatibility with camelCase column names for dynamic finders #533 [Dee.Zsombor]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-30 15:49:28 +00:00
David Heinemeier Hansson
7881e4dae0
Fixed OCI fixtures [Ryan Carver]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1225 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-19 10:58:22 +00:00
David Heinemeier Hansson
cdf88b7b04
Fixed stray comma when using eager loading and ordering together from has_many associations #1143
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1220 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-19 05:24:50 +00:00