--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: "All association reflections defined for this model (default: none)."
  name: association_reflections
  rw: R
class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "Each kind of association adds a number of instance methods to the model class which are specialized according to the association type and optional parameters given in the definition. Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  class Project &lt; Sequel::Model\n    many_to_one :portfolio\n    one_to_many :milestones\n    # or: many_to_many :milestones\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: "The project class now has the following instance methods:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: portfolio - Returns the associated portfolio.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: portfolio=(obj) - Sets the associated portfolio to the object, but the change is not persisted until you save the record.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: portfolio_dataset - Returns a dataset that would return the associated portfolio, only useful in fairly specific circumstances.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: milestones - Returns an array of associated milestones
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: add_milestone(obj) - Associates the passed milestone with this object.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: remove_milestone(obj) - Removes the association with the passed milestone.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: remove_all_milestones - Removes associations with all associated milestones.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: milestones_dataset - Returns a dataset that would return the associated milestones, allowing for further filtering/limiting/etc.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: If you want to override the behavior of the add_/remove_/remove_all_ methods, there are private instance methods created that a prepended with an underscore (e.g. _add_milestone). The private instance methods can be easily overridden, but you shouldn't override the public instance methods without calling super, as they deal with callbacks and caching.
- !ruby/struct:SM::Flow::P 
  body: By default the classes for the associations are inferred from the association name, so for example the Project#portfolio will return an instance of Portfolio, and Project#milestones will return an array of Milestone instances.
- !ruby/struct:SM::Flow::P 
  body: "Association definitions are also reflected by the class, e.g.:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Project.associations\n  =&gt; [:portfolio, :milestones]\n  Project.association_reflection(:portfolio)\n  =&gt; {:type =&gt; :many_to_one, :name =&gt; :portfolio, :class_name =&gt; &quot;Portfolio&quot;}\n"
constants: []

full_name: Sequel::Model::Associations::ClassMethods
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: all_association_reflections
- !ruby/object:RI::MethodSummary 
  name: associate
- !ruby/object:RI::MethodSummary 
  name: association_reflection
- !ruby/object:RI::MethodSummary 
  name: associations
- !ruby/object:RI::MethodSummary 
  name: eager_loading_dataset
- !ruby/object:RI::MethodSummary 
  name: inherited
- !ruby/object:RI::MethodSummary 
  name: many_to_many
- !ruby/object:RI::MethodSummary 
  name: many_to_one
- !ruby/object:RI::MethodSummary 
  name: one_to_many
name: ClassMethods
superclass: 
