diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-08-07 11:58:45 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-08-07 11:58:45 -0700 |
commit | 06afa48c8c7bb7bf75f9e7ae48e06528f8ff82ed (patch) | |
tree | 9cecacc58dce4ed33885c2c143c10aca5feadb6d /activerecord/test/models/company.rb | |
parent | 010a0c92eb573cd4c216c51371356adddfde11cf (diff) | |
parent | 5f0c425e8d106df4cdf844ac4859fc373f9c43e1 (diff) | |
download | rails-06afa48c8c7bb7bf75f9e7ae48e06528f8ff82ed.tar.gz rails-06afa48c8c7bb7bf75f9e7ae48e06528f8ff82ed.tar.bz2 rails-06afa48c8c7bb7bf75f9e7ae48e06528f8ff82ed.zip |
Merge branch 'oracle_enhanced'
Diffstat (limited to 'activerecord/test/models/company.rb')
-rw-r--r-- | activerecord/test/models/company.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb index 22168468a6..1c05e523e0 100644 --- a/activerecord/test/models/company.rb +++ b/activerecord/test/models/company.rb @@ -73,12 +73,16 @@ class Firm < Company has_one :unvalidated_account, :foreign_key => "firm_id", :class_name => 'Account', :validate => false has_one :account_with_select, :foreign_key => "firm_id", :select => "id, firm_id", :class_name=>'Account' has_one :readonly_account, :foreign_key => "firm_id", :class_name => "Account", :readonly => true - has_one :account_using_primary_key, :primary_key => "firm_id", :class_name => "Account" + # added order by id as in fixtures there are two accounts for Rails Core + # Oracle tests were failing because of that as the second fixture was selected + has_one :account_using_primary_key, :primary_key => "firm_id", :class_name => "Account", :order => "id" has_one :deletable_account, :foreign_key => "firm_id", :class_name => "Account", :dependent => :delete end class DependentFirm < Company - has_one :account, :foreign_key => "firm_id", :dependent => :nullify + # added order by id as in fixtures there are two accounts for Rails Core + # Oracle tests were failing because of that as the second fixture was selected + has_one :account, :foreign_key => "firm_id", :dependent => :nullify, :order => "id" has_many :companies, :foreign_key => 'client_of', :order => "id", :dependent => :nullify end |