[Zope] Not persistent on all classes please
Peter Bengtsson
mail@peterbe.com
Wed, 5 Sep 2001 17:06:47 +0200
> > PS. All I know about persistance is that if you base class it, you
> > automatically get persistent objects. How it happens, I don't know.
>
> They only stay around if you store references to them anywhere...
>
> eg:
>
> x.b = a
>
> Now, if x is stored persistently (ie somewhere else you have y.b=x), then
a will
> be too.
> Inheritence from the Persistent class doesn't haev that much to do with it
to be
> honest ;-)
What I basically want it to do is to save File objects in a container.
The class name I chose was "TempObjectHolder" for this subclass.
the most important method it has is::
def saveTempFile(self,file):
"""
pseudo class.
create a file, but the file must still be there when I restart
Zope if possible
"""
self.manage_addFile(generatedId(),file)