Module: Sequel::Model::Associations

Defined in:
lib/sequel/model/associations.rb

Overview

Associations are used in order to specify relationships between model classes that reflect relations between tables in the database using foreign keys.

Defined Under Namespace

Modules: AssociationDatasetMethods, ClassMethods, DatasetMethods, InstanceMethods Classes: AssociationReflection, ManyToManyAssociationReflection, ManyToOneAssociationReflection, OneToManyAssociationReflection

Constant Summary collapse

ASSOCIATION_TYPES =

Map of association type symbols to association reflection classes.

{}

Class Method Summary collapse

Class Method Details

.apply(model) ⇒ Object

Set an empty association reflection hash in the model



10
11
12
# File 'lib/sequel/model/associations.rb', line 10

def self.apply(model)
  model.instance_variable_set(:@association_reflections, {})
end