> Ok, now I understand. Any security rationale for doing that? > It's very unhandy. > In this situation you should use framework REFINTEG_RESTRICT integrity rule, > then write deleteUpward() method yourself, e.g.: > > <code> > def deleteUpward(self, startTransaction=True): > > startTransaction = startTransaction and self.beginTransaction() > try: > self.deleteAll(startTransaction=False) > parent = self.Parent > if parent: > parent.deleteUpward(startTransaction=False) > if startTransaction: > self.commitTransaction() > except (dException.DBQueryException, StandardError): > if startTransaction: > self.rollbackTransaction() > raise > </code> > > Conditionally, you can use beforeDelete method, but remember that there will > be no single transaction, but one per business object. >Can we construct a logic (maybe a recursive def) by which the parent-child chain down the line can be listed. >Then construct "deleteUpward()" method, which when called, will delete child records from childs tables, >one-by-one, from bottom table to top.
I understood what you have coded. Your deleteUpward() does the same thing. OK. I will test it & let you know. Thanks, Vineet _______________________________________________ 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]
