Class: Sequel::Model::Associations::OneToOneAssociationReflection

Inherits:
OneToManyAssociationReflection show all
Defined in:
lib/sequel/model/associations.rb

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 OneToManyAssociationReflection

#associated_object_keys, #can_have_associated_objects?, #default_key, #eager_loader_key, #primary_key, #reciprocal_array?, #remove_before_destroy?, #remove_should_check_existing?, #set_reciprocal_to_self?

Methods inherited from 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_loading_use_associated_key?, #need_associated_primary_key?, #reciprocal, #reciprocal_array?, #remove_all_method, #remove_before_destroy?, #remove_method, #remove_should_check_existing?, #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

#returns_array?Boolean

one_to_one associations return a single object, not an array

Returns:

  • (Boolean)


301
302
303
# File 'lib/sequel/model/associations.rb', line 301

def returns_array?
  false
end