On 6/22/11 6:02 AM, Ed Leafe wrote:
> On Jun 22, 2011, at 1:57 AM, Paul McNett wrote:
>
>> I want kons.REFINTEG_CASCADE for all child bizobj's *except* this one, but 
>> there
>> doesn't appear to be a way.
>
>
>       I believe we talked about this a while ago in another context. The 
> general idea was to be able to specify the insert/update/delete logic for 
> each child. I think that making atts like 'self.deleteChildLogic' into a 
> dict, with the child as the key and the appropriate constant as the value 
> would be the way to go. We could still have a default setting that would work 
> in the absence of specific child settings: e.g., when the parent is deleted, 
> we would use
>
> self.deleteChildLogic.get(child, self.defaultDeleteChildLogic)
>
>       In your case, you would add the children as before, and then set the 
> ref. integrity logic like this:
>
> self.defaultDeleteChildLogic to kons.REFINTEG_CASCADE
> self.deleteChildLogic[self.bizShapeEffect] = kons.REFINTEG_IGNORE
>
>       Does that make sense?

Yes, but what about putting a property in the bizobj, like ParentDeleteLogic, 
defaulting to None, which means to go with however the Parent's 
deleteChildLogic is set.

And, what about propertyizing these attributes while we are at it?

This way, I could do:

"""
self.bizShapeEffect = ShapeEffect(app.dbConnection, 
ParentDeleteLogic=kons.REFINTEG_IGNORE)

self.addChild(self.BizShapeEffect)
"""

Paul


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

Reply via email to