Sha256: d884257a5acad85d094f8b08abddfa599aabb6ff73fbaa0948828afedc5ee28f

Contents?: true

Size: 485 Bytes

Versions: 24

Compression:

Stored size: 485 Bytes

Contents

class Employee < ActiveRecord::Base
	belongs_to :department, :foreign_key => [:department_id, :location_id]
	has_many :comments, :as => :person
	has_and_belongs_to_many :groups
	has_many :salaries, :primary_key => [:id, :location_id],
		                  :foreign_key => [:employee_id, :location_id]
	has_one :one_salary, :class_name => "Salary",
		                   :primary_key => [:id, :location_id],
		                   :foreign_key => [:employee_id, :location_id]
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
composite_primary_keys-11.0.3 test/fixtures/employee.rb
composite_primary_keys-11.0.2 test/fixtures/employee.rb
composite_primary_keys-10.0.5 test/fixtures/employee.rb
composite_primary_keys-9.0.10 test/fixtures/employee.rb
composite_primary_keys-11.0.1 test/fixtures/employee.rb
composite_primary_keys-11.0.0 test/fixtures/employee.rb
composite_primary_keys-10.0.4 test/fixtures/employee.rb
composite_primary_keys-9.0.9 test/fixtures/employee.rb
composite_primary_keys-10.0.3 test/fixtures/employee.rb
composite_primary_keys-11.0.0.rc1 test/fixtures/employee.rb
composite_primary_keys-11.0.0.beta4 test/fixtures/employee.rb
composite_primary_keys-11.0.0.beta3 test/fixtures/employee.rb
composite_primary_keys-11.0.0.beta2 test/fixtures/employee.rb
composite_primary_keys-11.0.0.beta1 test/fixtures/employee.rb
composite_primary_keys-10.0.2 test/fixtures/employee.rb
composite_primary_keys-10.0.1 test/fixtures/employee.rb
composite_primary_keys-9.0.8 test/fixtures/employee.rb
composite_primary_keys-10.0.0 test/fixtures/employee.rb
composite_primary_keys-9.0.7 test/fixtures/employee.rb
composite_primary_keys-9.0.6 test/fixtures/employee.rb