[Zope] Re: Zope 3 Newbie Persistent Question
tseaver at palladion.com
Mon Oct 9 09:30:01 EDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Perry Smith wrote:
> I've read through 2/3rds of Web Component Development with Zope 3. I am
> just now starting to create a simple system to hold contact information.
> If I start simple with maybe five fields and make it persistent, what
> happens when I add fields later on? Does the Zope database just
> magically understand that the old elements do not have all of the fields
The simplest answer is "yes, but it isn't magic": you would neeed to
provide a class-level default for the newly-added attributes.
zope.schema.fieldproperty.FieldProperty is a particularly good way to
set up those class-level defaults, as it uses the default value you
declare in the schema.
Tres Seaver +1 202-558-7113 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v22.214.171.124 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Zope