On Oct 31, 2006, at 12:27 PM, Jesus Cea wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Mike Orr wrote: >> The only reason this came up is that >> the root object is a PersistentDict and is not overridable. I still >> suggest a >> callable arg in the storage constructor that if present returns an >> initialized root object (any subclass of PersistentObject) to seed >> the >> database if it doesn't exist. This both allows for an alternate root >> class and provides a convenient place to put your database-setup >> code; >> e.g., to set up the empty collections needed by the rest of the >> application. To make it easier to control the class of the root that is created for an empty database, the devel version of the code now has a "root_class" keyword argument (default None) on the Connection constructor. If not given, we get the current behavior. If a root_class value is given, and the database has no root object, a new one is made with the given class.