[Zope] Question regarding InvalidObjectReference and the storing of objects in the session

Alec Munro alec.munro@eoascientific.com
Thu, 17 Jul 2003 12:07:13 -0300


Chris Withers wrote:
> Alec Munro wrote:
> 
>>
>> I've had a system where I was storing object URLs in the session, and 
>> using restrictedTraverse to access the objects. I got it in my mind 
>> today that perhaps my knowledge of zope had expanded to the degree 
>> that I could figure out how to bypass this step and simply store the 
>> objects themselves in the session.
> 
> 
> You can't really do that. The session is in one ZODB (TemporaryStorage), 
> while the rest of your data is in another (most likely FileStorage).
> ZODB won't let you store an object from one storage in another storage...
> 
> So, you'll have to stick to storing paths to objects...
> 
> cheers,
> 
> Chris
> 
Thanks Chris,
That's pretty much how I understood it. But I'm still kind of puzzled as 
to why I was able to store one object but not another. Are folders 
stored differently? That's about the only answer I could come up with.

Take care,

Alec