Class: Dart::Database::Relation
- Includes:
- NamingConventions::RelationHelpers
- Defined in:
- lib/dart/database/relation.rb
Overview
A Database::Relation extends Dart::Relation with naming conventions to support table reflection
Instance Attribute Summary
Attributes inherited from Relation
Instance Method Summary collapse
- #add_many_to_many(*ass_args) ⇒ Object
- #add_many_to_one(*ass_args) ⇒ Object
- #add_one_to_many(*ass_args) ⇒ Object
Methods included from NamingConventions::RelationHelpers
#disambiguate_conflicting_join_names!, #duplicate_join_association_names, #has_direct_conventional_parent?, #possible_join_pairs
Methods inherited from Relation
#add_association, #all_associations, #child_associations, #direct_associations, #initialize, #join_associations, #parent_associations, #to_s
Constructor Details
This class inherits a constructor from Dart::Relation
Instance Method Details
#add_many_to_many(*ass_args) ⇒ Object
15 16 17 |
# File 'lib/dart/database/relation.rb', line 15 def add_many_to_many(*ass_args) add_association ManyToManyAssociation.new(*ass_args) end |
#add_many_to_one(*ass_args) ⇒ Object
7 8 9 |
# File 'lib/dart/database/relation.rb', line 7 def add_many_to_one(*ass_args) add_association ManyToOneAssociation.new(*ass_args) end |
#add_one_to_many(*ass_args) ⇒ Object
11 12 13 |
# File 'lib/dart/database/relation.rb', line 11 def add_one_to_many(*ass_args) add_association OneToManyAssociation.new(*ass_args) end |