Class: Sequel::Plugins::ManyThroughMany::ManyThroughManyAssociationReflection

Inherits:
Model::Associations::ManyToManyAssociationReflection show all
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

Methods inherited from Model::Associations::ManyToManyAssociationReflection

#associated_key_alias, #associated_key_column, #associated_object_keys, #can_have_associated_objects?, #default_join_table, #default_left_key, #default_right_key, #eager_loader_key, #eager_loading_predicate_key, #eager_loading_use_associated_key?, #join_table_alias, #join_table_source, #need_associated_primary_key?, #qualified_right_key, #qualified_right_primary_key, #right_primary_key, #right_primary_key_method, #right_primary_key_methods, #right_primary_keys, #select

Methods inherited from Model::Associations::AssociationReflection

#_add_method, #_dataset_method, #_remove_all_method, #_remove_method, #_setter_method, #add_method, #associated_class, #association_method, #can_have_associated_objects?, #dataset_helper_method, #dataset_method, #dataset_need_primary_key?, #eager_graph_lazy_dataset?, #eager_limit_strategy, #eager_loading_use_associated_key?, #limit_and_offset, #need_associated_primary_key?, #qualify, #qualify_assoc, #qualify_cur, #reciprocal_array?, #remove_all_method, #remove_before_destroy?, #remove_method, #remove_should_check_existing?, #returns_array?, #select, #set_reciprocal_to_self?, #setter_method

Methods included from Inflections

clear, irregular, plural, singular, uncountable

Methods inherited from Hash

#&, #case, #hstore, #sql_expr, #sql_negate, #sql_or, #|, #~

Instance Method Details

#default_associated_key_aliasObject

The default associated key alias(es) to use when eager loading associations via eager.



52
53
54
# File 'lib/sequel/plugins/many_through_many.rb', line 52

def default_associated_key_alias
  self[:uses_left_composite_keys] ? (0...self[:through].first[:left].length).map{|i| :"x_foreign_key_#{i}_x"} : :x_foreign_key_x
end

#reciprocalObject

Many through many associations don’t have a reciprocal



65
66
67
# File 'lib/sequel/plugins/many_through_many.rb', line 65

def reciprocal
  nil
end