[Zope] Newbie Questions - many-many relationships? Zope 2 or 3?

Andreas Pakulat apaku at gmx.de
Tue Jun 21 18:08:46 EDT 2005


On 21.Jun 2005 - 21:59:41, Jim Vine wrote:
> Say, for example that my Zope App in some way has a
> "House" object, which records the address, the owner,
> and a short description. Later on, I may wish to add
> further fields to record, say, the number of bedrooms,
> but the system is already in use - if I've developed
> in the ZMI, will this make it harder to make an
> upgrade?

Such a change might not be a problem using ZMI, as you can freely add
properties to any object. You'd have to supply the data for all existing
objects though (but you'd need to do that when using a product too).

> > Hmm, what I would start with is an attribute for a
> > house containing a
> > list of references to owners. And vice versa, each
> > owner has a list of
> > references to houses.
> 
> I had thought of this, but my concern was about how to
> make sure that the two records are kept accurate -
> basically the suggestion is to keep two records saying
> the same thing, which just triggers alarm bells with
> me.

Yes, it should have triggered mine too, as I wouldn't do that in my own
apps....

> > Nah. You either let every PropertyOwner have a list
> > of the ids of
> > HouseProperty objects, or the other way around. Then
> > you index this is
> > the catalog so you can search. Tada!
> 
> I like the sound of this a bit better

It is.

Andreas

-- 
You will inherit millions of dollars.


More information about the Zope mailing list