[Zope-dev] ZClass inheriting from Python Class
Miller, John M.
jmiller1@uop.com
Thu, 22 Jul 1999 07:47:35 -0500
Heya,
If I've read and interpreted the Documentation properly, you need to make
your Python class a subclass of BoboPOS.Persistent. Then I think you need
to do something like get_transaction().commit() when you want to commit
changes you've made. Though it may be that Zope takes care of transactions
most of the time and you don't have to worry about this. I also just
discovered a 27 page document on ZODB 3 (cool! the more stuff to read, the
better I say) which definitely will have a more definitive answer than my
casual hack.
ZODB-ly yours, (pronounced zodebely, rhymes with notably, of course)
John
> -----Original Message-----
> From: Martijn Faassen [SMTP:faassen@vet.uu.nl]
> Sent: Thursday, July 22, 1999 4:18 AM
> To: zope-dev@zope.org
> Subject: [Zope-dev] ZClass inheriting from Python Class
>
> Hi everybody,
>
> I've been toying with ZClasses. I made a simple Python class and
> registered it with Zope as mentioned in the ZClass tutorial. Then I made
> a ZClass that inherits from this Python class. I store some text data in
> a list in the ZClass.
>
> This works fine, except when I restart Zope; the data in the list is
> gone. Apparently the mixin Python class is not automatically persistent.
> Is this what should happen? What do I do about it?
>
> Regards,
>
> Martijn
>
> _______________________________________________
> Zope-Dev maillist - Zope-Dev@zope.org
> http://www.zope.org/mailman/listinfo/zope-dev
>
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
>
> For non-developer, user-level issues,
> zope@zope.org, http://www.zope.org/mailman/listinfo/zope )