David Heinemeier Hansson wrote:

> All this might seem pretty hard to understand why it's really cool.  
> That's until you see the first application of it:
>
> * Added :dependent option to has_many and has_one, which will  
> automatically destroy associated objects when the holder is destroyed:
>
>     class Album < ActiveRecord::Base
>       has_many :tracks, :dependent => true
>     end
>
>   All the associated tracks are destroyed when the album is. 

One other question: Are these operations atomic?  Does a transaction get 
started before the cascading deletes occur and end when they are 
finished?  Because otherwise you could have orphaned rows if the server 
gets hosed while you are still in the process of deleting something's 
children.