From: Carl Youngblood Date: 2004-06-05T00:33:55+09:00 Subject: Re: [ANN] Active Record 0.8.2: Inheritable callback ques 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. > > Pretty neat, hu? This all does look pretty cool, because it has the potential to make application development truly rapid. I do have some concerns about performance though. How does this approach compare with an ON DELETE CASCADE, for example? It seems like if you kept more of the application logic in the database things would run much faster. On the other hand, this approach also has some definite drawbacks. Carl