Class: Sequel::Model::Associations::OneThroughOneAssociationReflection

Inherits:
ManyToManyAssociationReflection show all
Includes:
SingularAssociationReflection
Defined in:
lib/sequel/model/associations.rb

Constant Summary

Constants inherited from AssociationReflection

AssociationReflection::ASSOCIATION_DATASET_PROC

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 included from SingularAssociationReflection

#assign_singular?, #filter_by_associations_add_conditions?, #limit_and_offset, #returns_array?

Methods inherited from ManyToManyAssociationReflection

#associated_key_alias, #associated_key_array, #associated_key_column, #associated_object_keys, #can_have_associated_objects?, #cloneable?, #default_associated_key_alias, #default_eager_loader, #default_join_table, #default_left_key, #eager_loading_use_associated_key?, #join_table_alias, #join_table_source, #need_associated_primary_key?, #predicate_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 AssociationReflection

#_add_method, #_remove_all_method, #_remove_method, #_setter_method, #add_method, #apply_dataset_changes, #apply_distinct_on_eager_limit_strategy, #apply_eager_dataset_changes, #apply_eager_graph_limit_strategy, #apply_eager_limit_strategy, #apply_ruby_eager_limit_strategy, #apply_window_function_eager_limit_strategy, #assign_singular?, #associated_class, #associated_dataset, #association_dataset_for, #association_dataset_proc, #association_method, #can_have_associated_objects?, #cloneable?, #dataset_method, #dataset_need_primary_key?, #delete_row_number_column, #eager_graph_lazy_dataset?, #eager_graph_limit_strategy, #eager_limit_strategy, #eager_load_results, #eager_loader_key, #eager_loading_predicate_key, #eager_loading_use_associated_key?, #filter_by_associations_add_conditions?, #filter_by_associations_conditions_expression, #handle_silent_modification_failure?, #initialize_association_cache, #limit_and_offset, #need_associated_primary_key?, #placeholder_loader, #predicate_key_values, #predicate_keys, #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, #slice_range

Methods included from Inflections

clear, irregular, plural, singular, uncountable

Methods inherited from Hash

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

Instance Method Details

#default_right_keyObject

one_through_one associations should not singularize the association name when creating the foreign key.



1343
1344
1345
# File 'lib/sequel/model/associations.rb', line 1343

def default_right_key
  :"#{self[:name]}_id"
end

#reciprocalObject

one_through_one associations have no reciprocals



1348
1349
1350
# File 'lib/sequel/model/associations.rb', line 1348

def reciprocal
  nil
end