Anthony Baxter wrote:
> I've nearly completed the code to make MountedFileStorage able to
> create new FileStorages on demand, _however_...
> I'm hitting a bit of a problem with the Product initialisation. Right
> now I'm just calling OFS.Application.initialize(), which goes through
> and re-imports all the products, and adds them to the global meta_types
> list. This is bad - it means it's slow as hell reimporting everything,
> and everything gets listed twice. It's fine after a restart, but that's
> not much help.
> I can't just skip product initialisation, as it's kinda needed to create
> objects in the sub-zodb.
I looked some more at ZClasses and such today, hoping to solve the
problem with mounted databases. Guess what! It turned out to be a
The latest addition to Mount.py provides the ability for a MountPoint
to get its ZClass definitions from the root database rather than the
mounted database. Anthony, I think you'll want to make
"classDefsFromRoot" a checkbox available when adding a new mount point.
Depending on the application, this can be the more sensible (and more
manageable) approach. For example, you may want to have a large
collection of little FileStorages, all using the same ZClass
definitions. You certainly wouldn't want to make a copy of all
ZClasses in each FileStorage.
In doing this I realized, and Jim suggested, that there are other
situations where you'd really want ZClass definitions to come from the
mounted database. This is a larger issue. We will first need to
provide a way to manage the databases. Then there will be a need to
load/unload products dynamically. I don't think we want to try to
finish that for 2.2.0.
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -