[Zope] Persistent references to persistent objects ?!?!
Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Sat Feb 7 20:16:30 EST 2004
mxmRelationsManager ?
-----Original Message-----
From: zope-bounces at zope.org [mailto:zope-bounces at zope.org]On Behalf Of
Paul Winkler
Sent: Friday, February 06, 2004 5:17 PM
To: zope at zope.org
Subject: Re: [Zope] Persistent references to persistent objects ?!?!
On Fri, Feb 06, 2004 at 04:55:26PM -0500,
Jean-Francois.Doyon at CCRS.NRCan.gc.ca wrote:
> Dieter,
>
> Hmmm interesting point. I suppose a basic rule of thumb would be that the
> reference should never be stored directly as an attribute of a folderish
> type ?
>
> I can imagine many useful scenarios where keeping references to objects
can
> be very handy (Versioning, workflow, lists of objects, etc ...) ...
Although
> I have to admit the symlink think had never really even occured to me.
I'd
> imagine instead maintaining a list of references for instance, maybe
stored
> as an attribute of some other non-folderish type ... you know maybe build
> some content-type class that, as part of it's functionality, keeps
> references to objects ?
mxmRelationsManager might help with this. I'm using it for
a similar purpose - maintaining paths of related objects
that are preserved even if the objects move.
It requires adding a line of code to your class's manage_beforeDelete
and manage_afterAdd so that the paths get updated properly.
i haven't yet checked what happens if i restore a deleted
object using "Undo".
/me goes to add that to his functional tests
--
Paul Winkler
http://www.slinkp.com
_______________________________________________
Zope maillist - Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )
More information about the Zope
mailing list