Re: Bugtracker for z3c.relationfield and reasons for objects loosing their parent pointers

Patrick Gerken <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <CAFefbnFQD59ogLZXJacN7+cgwqpCKQ3mZO9hDYpKpE7JTzrx2g@mail.gmail.com>
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 <[email protected]> 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
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.