diff options
author | Matt Jones <al2o3cr@gmail.com> | 2009-11-07 14:00:54 -0500 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2009-11-10 18:41:37 +1300 |
commit | d625312fe11bbf53e285a0efd570249f0bf91fd1 (patch) | |
tree | 9ded25037ea44d55e11abb4e84a174694f99a350 /activerecord/test/models | |
parent | 11e798ae0f2f46498811282756c9d21df3d4b523 (diff) | |
download | rails-d625312fe11bbf53e285a0efd570249f0bf91fd1.tar.gz rails-d625312fe11bbf53e285a0efd570249f0bf91fd1.tar.bz2 rails-d625312fe11bbf53e285a0efd570249f0bf91fd1.zip |
delete correct records for a has_many with :primary_key and :dependent => :delete_all
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/company.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb index 469f5399ae..7e93fda1eb 100644 --- a/activerecord/test/models/company.rb +++ b/activerecord/test/models/company.rb @@ -68,6 +68,8 @@ class Firm < Company has_many :readonly_clients, :class_name => 'Client', :readonly => true has_many :clients_using_primary_key, :class_name => 'Client', :primary_key => 'name', :foreign_key => 'firm_name' + has_many :clients_using_primary_key_with_delete_all, :class_name => 'Client', + :primary_key => 'name', :foreign_key => 'firm_name', :dependent => :delete_all has_many :clients_grouped_by_firm_id, :class_name => "Client", :group => "firm_id", :select => "firm_id" has_many :clients_grouped_by_name, :class_name => "Client", :group => "name", :select => "name" |