[Zope] Simple ZClass Question
Dieter Maurer
dieter@handshake.de
Mon, 22 Jan 2001 19:41:37 +0100 (CET)
Gerald Gutierrez writes:
> Using Zope 2.3.0b2, I've found that if I create a ZClass with "Include
> standard Zope persistent object base classes" enabled, I can instantiate
> the ZClass right away. If I don't have it enabled, I can still create the
> ZClass, but instantiating it gives me the following error:
>
> Zope has encountered an error while publishing this resource.
> Error Type: AttributeError
> Error Value: _setId
In order to put an object into the ZODB, it must have appropriate
infrastructure, such as "_setId" (it must be a Persistent instance, too).
The necessary infrastructure is provided, when you check
the "Include ... persistent base classes". Otherwise, it is not.
You would check this option, when your ZClass should produce
ZInstances in the ZODB. You would not check it, when
you want to use them as pluggable brains for ZSQL methods
(for example).
Dieter