Oleg, we actually created the dm-constraints plugin for precisely this
functionality. Currently it will create some DB level constraints, but
the plan was to make it create code level constraints always, and then
DB level constraints if the storage engine supports it.  That way
there's two levels of protection on the data.  It's also really nice
for testing because if you forget and delete a parent before a child,
it will blow up and tell you.

Dan
(dkubb)


On Nov 7, 6:05 am, Oleg Andreev <[EMAIL PROTECTED]> wrote:
> This module adds support for :dependent option and also  
> sets :dependent => :destroy as a default strategy (which is a Good  
> Thing). You may set DestroyAssociations.brain_damaged_project = true  
> to set :dependent => nil as a default value.
>
> http://pastie.org/309507
>
> 0) :delete_all is not supported yet (this is a single-query deletion  
> of associated records)
> 1) :delete is not fast, but faster than :destroy
> 2) :nullify implementation is not fast, but safe. Fast raw sql version  
> would not be safe. As well as :delete and :delete_all.
>
> See comments in the source for more information.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to