module CQL::ActiveRecord::Dependents

Overview

Applies the dependent: strategies of a model's associations when a record is deleted.

has_many and has_one register an association when it declares dependent:; many_to_many always registers one, so deleting a record removes its join rows. A restrict_with_error association is checked before anything is deleted; the others run in declaration order, in the same transaction as the record's own delete.

Defined in:

active_record/dependents.cr