--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: apply
- !ruby/object:RI::MethodSummary 
  name: configure
comment: 
- !ruby/struct:SM::Flow::P 
  body: "The AssociationDependencies plugin allows you do easily set up before and/or after destroy hooks for destroying, deleting, or nullifying associated model objects. The following association types support the following dependency actions:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ":many_to_many - :nullify (removes all related entries in join table)"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ":many_to_one - :delete, :destroy"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ":one_to_many - :delete, :destroy, :nullify (sets foreign key to NULL for all associated objects)"
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: This plugin works directly with the association datasets and does not use any cached association values. The :delete action will delete all associated objects from the database in a single SQL call. The :destroy action will load each associated object from the database and call the destroy method on it.
- !ruby/struct:SM::Flow::P 
  body: "To set up an association dependency, you must provide a hash with association name symbols and dependency action values. You can provide the hash to the plugin call itself or to the add_association_dependencies method:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Business.plugin :association_dependencies, :address=&gt;delete\n  # or:\n  Artist.plugin :association_dependencies\n  Artist.add_association_dependencies :albums=&gt;:destroy, :reviews=&gt;:delete, :tags=&gt;:nullify\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Mapping of association types to when the dependency calls should be made (either :before for in before_destroy or :after for in after_destroy)
  name: ASSOCIATION_MAPPING
  value: "{:one_to_many=>:before, :many_to_one=>:after, :many_to_many=>:before}"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The valid dependence actions
  name: DEPENDENCE_ACTIONS
  value: "[:delete, :destroy, :nullify]"
full_name: Sequel::Plugins::AssociationDependencies
includes: []

instance_methods: []

name: AssociationDependencies
superclass: 
