R: [Zope] Discussion: Best practice site struture (LONG)

Max M maxm@mxm.dk
Thu, 11 Apr 2002 20:07:55 +0200


Paul Winkler wrote:

>On Thu, Apr 11, 2002 at 10:33:45AM +0200, Max M wrote:
>
>>The correct way to ensure that there are no dangling relations naturally 
>>is to create a method in any product being related to like (from the top 
>>of my head)::
>>
>>    def manage_beforeDelete(self):
>>        self.relations.delete(self)
>>
>>Then things happens cleanly.
>>
>
>But that means that every class you want to relate has to know
>about relations. I thought the relations were completely external
>to the related objects? Seems like you're breaking encapsulation.
>

No. self.relations.delete(self) happens through aquisition.

regards Max M