Hi, I found out, somewhat surprised, that __parent__ pointers are just disguised aq_parent pointers. The changelog entries for zope 2.12 are a bit misleading in this regard. Is there somewhere an explanation of how this works? I was quite by some of the properties. Best regards, Patrick On Tue, Mar 27, 2012 at 00:09, Patrick Gerken <do3ccqrv@googlemail.com> wrote:
Hi,
I have a very curious problem with relationfields, and I don't know which bugtracker to use for z3c.relationfield. So, hopefully somebody here can give me some pointers.
The relations are persistent objects and the from relation is stored directly on them on the from_object.
For some reason, the existing relations have from objects without __parent__ or aq_parent pointers. When I update a relation, from_object is updated with an object with __parent__ and aq_parent pointers. After restart, the pointers are gone, the attribute value is None. When I want to delete the relation target object, Plone first starts a savepoint, tries to delete the object, catches any exceptions and does a rollback. It does so to test for certain exception. After the rollback, the objects lost their __parent__ and aq_parent pointers. There was something else that felt odd. the object in from_object always returned a string representation without a path on obj.__str__(), but a string representation with a path when doing obj.__repr__() and when the object had __parent__ pointers. I noticed that, because print statements and pdb tests displayed different things. The whole thing happens in Zope 2.13 with dexterity content types. I have no idea why this could happen. Anybody has any pointers for me?
Thanks and best regards,
Patrick