Class: Sequel::Plugins::ManyThroughMany::ManyThroughManyAssociationReflection
- Inherits:
-
Model::Associations::ManyToManyAssociationReflection
- Object
- Hash
- Model::Associations::AssociationReflection
- Model::Associations::ManyToManyAssociationReflection
- Sequel::Plugins::ManyThroughMany::ManyThroughManyAssociationReflection
- Defined in:
- lib/sequel/plugins/many_through_many.rb
Overview
The AssociationReflection subclass for many_through_many associations.
Constant Summary
Constants included from Inflections
Inflections::CAMELIZE_CONVERT_REGEXP, Inflections::CAMELIZE_MODULE_REGEXP, Inflections::DASH, Inflections::DEMODULIZE_CONVERT_REGEXP, Inflections::EMPTY_STRING, Inflections::SLASH, Inflections::UNDERSCORE, Inflections::UNDERSCORE_CONVERT_REGEXP1, Inflections::UNDERSCORE_CONVERT_REGEXP2, Inflections::UNDERSCORE_CONVERT_REPLACE, Inflections::UNDERSCORE_MODULE_REGEXP, Inflections::VALID_CONSTANT_NAME_REGEXP
Instance Method Summary collapse
-
#associated_key_table ⇒ Object
The table containing the column to use for the associated key when eagerly loading.
-
#edges ⇒ Object
The list of joins to use when eager graphing.
-
#reciprocal ⇒ Object
Many through many associations don't have a reciprocal.
-
#reverse_edges ⇒ Object
The list of joins to use when lazy loading or eager loading.
Methods inherited from Model::Associations::ManyToManyAssociationReflection
#associated_key_alias, #associated_key_column, #default_associated_key_alias, #default_join_table, #default_left_key, #default_right_key, #eager_loader_key, #eager_loading_use_associated_key?, #need_associated_primary_key?, #right_primary_key, #select
Methods inherited from Model::Associations::AssociationReflection
#_add_method, #_dataset_method, #_remove_all_method, #_remove_method, #_setter_method, #add_method, #associated_class, #association_method, #dataset_helper_method, #dataset_method, #dataset_need_primary_key?, #eager_graph_lazy_dataset?, #eager_loading_use_associated_key?, #need_associated_primary_key?, #reciprocal_array?, #remove_all_method, #remove_method, #returns_array?, #select, #set_reciprocal_to_self?, #setter_method
Methods included from Inflections
clear, irregular, plural, singular, uncountable
Methods inherited from Hash
#&, #case, #sql_expr, #sql_negate, #sql_or, #|, #~
Instance Method Details
#associated_key_table ⇒ Object
The table containing the column to use for the associated key when eagerly loading
37 38 39 |
# File 'lib/sequel/plugins/many_through_many.rb', line 37 def associated_key_table self[:associated_key_table] = self[:final_reverse_edge][:alias] end |
#edges ⇒ Object
The list of joins to use when eager graphing
42 43 44 |
# File 'lib/sequel/plugins/many_through_many.rb', line 42 def edges self[:edges] || calculate_edges || self[:edges] end |
#reciprocal ⇒ Object
Many through many associations don't have a reciprocal
47 48 49 |
# File 'lib/sequel/plugins/many_through_many.rb', line 47 def reciprocal nil end |
#reverse_edges ⇒ Object
The list of joins to use when lazy loading or eager loading
52 53 54 |
# File 'lib/sequel/plugins/many_through_many.rb', line 52 def reverse_edges self[:reverse_edges] || calculate_edges || self[:reverse_edges] end |