Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread Christian Theune
Dieter Maurer wrote: Christian Theune wrote at 2006-7-13 17:13 +0200: ... Is there any ability in ZODB to retroactively wrap objects in a persistence mechanism instead of having to rewrite an entire library to use the Persistent class? You can always persist (almost) any object, even if it does

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread Dieter Maurer
Christian Theune wrote at 2006-7-13 17:13 +0200: > ... >> Is there any ability in ZODB to retroactively wrap objects in a >> persistence mechanism instead of having to rewrite an entire library >> to use the Persistent class? > >You can always persist (almost) any object, even if it does not subcla

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread Chris S
On 7/13/06, David Binger <[EMAIL PROTECTED]> wrote: On Jul 13, 2006, at 3:55 PM, Chris S wrote: > Uh, calling root.get(name, obj) assigns obj to the root if the name is > not yet defined. And of course I'm not assigning to any other > Persistent instances, since the point of the code was to sho

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread Paul Winkler
On Thu, Jul 13, 2006 at 03:55:53PM -0400, Chris S wrote: > not yet defined. And of course I'm not assigning to any other > Persistent instances, since the point of the code was to show that > Zope can't persist objects that don't inherit the Persistent class. It can, but: - non-Persistent objects

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread Christian Theune
David Binger wrote: On Jul 13, 2006, at 12:55 PM, Chris S wrote: You can always persist (almost) any object, even if it does not subclass from Persistent. However, any changes to the object will not be detected automatically and you would have to either a) reassign the object to the ZODB or b

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread Terry Jones
> "Chris" == Chris S <[EMAIL PROTECTED]> writes: Chris> Uh, calling root.get(name, obj) assigns obj to the root if the name Chris> is not yet defined. And of course I'm not assigning to any other Chris> Persistent instances, since the point of the code was to show that Chris> Zope can't persis

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread David Binger
On Jul 13, 2006, at 3:55 PM, Chris S wrote: Uh, calling root.get(name, obj) assigns obj to the root if the name is not yet defined. And of course I'm not assigning to any other Persistent instances, since the point of the code was to show that Zope can't persist objects that don't inherit the P

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread Chris S
On 7/13/06, David Binger <[EMAIL PROTECTED]> wrote: On Jul 13, 2006, at 1:35 PM, Chris S wrote: > On 7/13/06, David Binger <[EMAIL PROTECTED]> wrote: >> >> On Jul 13, 2006, at 12:55 PM, Chris S wrote: >> >> > I don't think this is the case. Consider my simple example >> below. None >> > of my c

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread David Binger
On Jul 13, 2006, at 1:35 PM, Chris S wrote: On 7/13/06, David Binger <[EMAIL PROTECTED]> wrote: On Jul 13, 2006, at 12:55 PM, Chris S wrote: > I don't think this is the case. Consider my simple example below. None > of my classes inherit Persistent, and even though I set _p_changed = >

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread Chris S
On 7/13/06, David Binger <[EMAIL PROTECTED]> wrote: On Jul 13, 2006, at 12:55 PM, Chris S wrote: > I don't think this is the case. Consider my simple example below. None > of my classes inherit Persistent, and even though I set _p_changed = > 1, nothing's persisted. In your example, it seems l

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread David Binger
On Jul 13, 2006, at 12:55 PM, Chris S wrote: You can always persist (almost) any object, even if it does not subclass from Persistent. However, any changes to the object will not be detected automatically and you would have to either a) reassign the object to the ZODB or b) mark it as c

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread Christian Theune
Chris S wrote: On 7/13/06, Christian Theune <[EMAIL PROTECTED]> wrote: Chris S wrote: > I'm trying to adopt some code to use ZODB as its persistence level. > I've read the "Writing a Persistent Class" article > (http://www.zope.org/Wikis/ZODB/FrontPage/guide/node3.html#SECTION000350

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread Chris S
On 7/13/06, Christian Theune <[EMAIL PROTECTED]> wrote: Chris S wrote: > I'm trying to adopt some code to use ZODB as its persistence level. > I've read the "Writing a Persistent Class" article > (http://www.zope.org/Wikis/ZODB/FrontPage/guide/node3.html#SECTION00035) > > but how

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread Paul Winkler
On Thu, Jul 13, 2006 at 10:56:50AM -0400, Chris S wrote: > I'm trying to adopt some code to use ZODB as its persistence level. > I've read the "Writing a Persistent Class" article > (http://www.zope.org/Wikis/ZODB/FrontPage/guide/node3.html#SECTION00035) > but how do you persist a c

Re: [ZODB-Dev] Adopting ZODB

2006-07-13 Thread Christian Theune
Chris S wrote: I'm trying to adopt some code to use ZODB as its persistence level. I've read the "Writing a Persistent Class" article (http://www.zope.org/Wikis/ZODB/FrontPage/guide/node3.html#SECTION00035) but how do you persist a class that already inherits another class? Doe