[Zope3-dev] zwiki: performance of findChildren()

Jeremy Hylton jeremy@zope.com
24 Apr 2003 14:08:23 -0400


On Wed, 2003-04-23 at 02:37, Roch=E9 Compaan wrote:
> I'd love to know what the caveats you ran into were. We built a
> relationship manager around mxmRelations and so far it has given us a
> lot of joy. It is still early though and maybe the problems you ran int=
o
> can help us steer around them.
>=20
> Briefly, this is how we put it together:
>=20
> For each class we define an _relations structure similar to _properties
> used by the PropertyManager that is a list of mappings specifying the i=
d
> and cardinality of the relationship:
>=20
>     class Person(<zope classes>, RelationsAware):
>         _relations =3D (
>             {'id': 'Organisation', 'cardinality': 'single'}
>             {'id': 'Address', 'cardinality': 'multiple'}
>         )
>=20

What is an mxmRelation?  I was thinking that some kind of property could
be used to provide indexex relations in ZODB, where client code could
treat the relation just like any other attribute.  Is that the basic
idea of what you're doing?

I'm not clear on how this would get integrated with the ObjectHub, but
it seems pretty useful for ZODB applications in general.

Jeremy