Class: Dart::OneToOneAssociation

Inherits:
DirectAssociation show all
Defined in:
lib/dart/core/one_to_one_association.rb

Constant Summary

Constants inherited from DirectAssociation

DirectAssociation::ATTRIBUTES

Constants inherited from Association

Association::MANY_TO_MANY_TYPE, Association::MANY_TO_ONE_TYPE, Association::ONE_TO_MANY_TYPE, Association::ONE_TO_ONE_TYPE

Instance Attribute Summary

Attributes inherited from Association

#model_class, #name, #scope

Instance Method Summary collapse

Methods inherited from DirectAssociation

#eql?, #hash, #initialize, #to_s

Methods inherited from Association

#set_name!

Constructor Details

This class inherits a constructor from Dart::DirectAssociation

Instance Method Details

#associated_tableObject



8
9
10
# File 'lib/dart/core/one_to_one_association.rb', line 8

def associated_table
  child_table
end

#to_one?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/dart/core/one_to_one_association.rb', line 12

def to_one?
  true
end

#typeObject



4
5
6
# File 'lib/dart/core/one_to_one_association.rb', line 4

def type
  ONE_TO_ONE_TYPE
end