[Zope-dev] Re: Refresh trashes acquisition
Toby Dickenson
tdickenson@geminidataloggers.com
Mon, 29 Jul 2002 07:58:22 +0100
On Saturday 27 Jul 2002 12:32 am, Ross Boylan wrote:
> On Sat, Jul 27, 2002 at 12:26:04AM +0200, Lennart Regebro wrote:
> > From: "Ross Boylan" <RossBoylan@stanfordalumni.org>
> >
> > > I don't follow that last paragraph. Does it mean
> > > 1. acquisition created by a.__of__(b) doesn't survive transactions.
> >
> > Correct.
>
> Just to be sure I understand: so if c is persistent, and I say
> c.d =3D a.__of__(b)
This is storing an acquisition wrapper as an attribute of c.=20
acquisition wrappers are not persistent. This will raise an exception if =
you=20
try to store c in ZODB.
> and then a few transactions later I come back and get c.d, I am not
> going to find it's a.__of__(b)?
If you are trying to store it in ZODB, no.
If you are trying to store it in a global variable, maybe. The answer wou=
ld be=20
"yes" except for products like Refresh that stomp on global variables.
> And also, does this mean that
> c.d =3D b.a
> also will not work? Or is it only the __of__ that has the problem?
no different.