On Aug 2, 2009, at 9:24 PM, Miguel Lopes wrote:

> I have a situation where when a record is deleted if its parent has no
> other child records it should also be deleted, and either both deletes
> are successful or should be discarded.

        If you mean that you want to delete a parent that no longer has any  
children, you could do this in the child's afterDelete() method.  
Create a method in the parent that scans self.__children to see if any  
child has records, and if not, have the parent delete itself, and then  
call that method from the afterDelete() of each of the children.


-- Ed Leafe





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to