[Zope] Re: Objects in transaction-Object do not support
absolute_url()
Tino Wildenhain
tino at wildenhain.de
Fri Dec 5 03:30:34 EST 2003
Hi Holger,
Holger Schmidt wrote:
[...]
>
> DM> You are right: they are not acquisition wrapped.
>
> >> Is there a chance to get the path to the object?
>
> DM> In Zope3, but (I fear) not in Zope2.
>
> DM> Zope3 abandons acquistion (or more generally: "context wrapper"s)
> DM> and puts an explicit parent attribute in objects.
>
> DM> If you have control over the objects, you can emulate
> DM> Zope3 behaviour in some sense. E.g. you can code
> DM> the path in an attribute of the object (be carefull
> DM> with copy/move/rename).
>
> I have no control over the objects so is there a chance to get the
> "real" (acquisition-wrapped) Objects from the objects in the
> transaction._objects-List?
> Or is there a possibility to get the "real" object from the object's
> id?
> Or any chance to come to the "real" Objects?
>
I fear there are only 2 resonable ways to solve your problem:
1) write a storage layer like ZRS (you can see DemoStorage
as a little reference)
2) make your own class tree of objects you want to be used
Depending on your time-line and your knowledge you can choose
the one or the other.
Regards
Tino Wildenhain
More information about the Zope
mailing list