Associations
are used in order to specify relationships between model classes that reflect relations between tables in the database using foreign keys.
Classes and Modules
- Sequel::Model::Associations::AssociationDatasetMethods
- Sequel::Model::Associations::ClassMethods
- Sequel::Model::Associations::DatasetMethods
- Sequel::Model::Associations::InstanceMethods
- Sequel::Model::Associations::SingularAssociationReflection
- Sequel::Model::Associations::AssociationReflection
- Sequel::Model::Associations::DatasetModule
- Sequel::Model::Associations::EagerGraphLoader
- Sequel::Model::Associations::ManyToManyAssociationReflection
- Sequel::Model::Associations::ManyToOneAssociationReflection
- Sequel::Model::Associations::OneThroughOneAssociationReflection
- Sequel::Model::Associations::OneToManyAssociationReflection
- Sequel::Model::Associations::OneToOneAssociationReflection
Constants
ASSOCIATION_TYPES | = | {} |
Map of association type symbols to association reflection classes. |
Public Class methods
apply(model)
Set an empty association reflection hash in the model
[show source]
# File lib/sequel/model/associations.rb 12 def self.apply(model) 13 model.instance_exec do 14 @association_reflections = {} 15 @autoreloading_associations = {} 16 @cache_associations = true 17 @default_eager_limit_strategy = true 18 @default_association_options = {} 19 @default_association_type_options = {} 20 @dataset_module_class = DatasetModule 21 end 22 end