From: "Ross Boylan" <RossBoylan@stanfordalumni.org>
Previously in this thread I was advised that acquisition relationships don't persist across transaction boundaries, and this was consistent with the failures I was getting when trying to use it
Sure, so you shouldn't create your own acquisition containment and expect it to survive over transactions. But the acquisition created by you creating Zope objects in the ZODB via the ZMI (or doing the same programatically) does of course survive transactions.
(actually, the relations only got zapped when I did a product refresh,
The refresh in Zope 2.5.1 is unusable, but I haven't figured out why yet, and nobody seems to be able to tell me. I don't have the problem that acquisition stops working. However, each time I do a refresh, some globals disappear, like referenses to other modules and stuff.
Not that much by hand; in fact they are mostly subclasses of SubItem or ObjectManager. The by hand part is that I have an explicit _container variable that I set in my classes, and various methods that support using it. So when I want something that might be in a container, I use those methods to get it rather than relying on acquisition.
Ah, OK. Yes, that would work too. But aqcisition does work. Maybe your problem just was that refresh is f*ck*d up... I'm going to try and remove the code from 2.5.1 that does refresh and put in the old refresh product instead, and see if that helps.