[Zope3-Users] Re: how to model a 1-to-1 relation

Jürgen Kartnaller juergen at kartnaller.at
Fri Jan 11 03:46:50 EST 2008



john saponara wrote:
> I want to allow the user to create car and driver objects in a 
> limoService container.  Car objects will stand alone, but each driver 
> object should contain a car object by reference (not by value) and the 
> driver add form should allow the user to choose which car the new driver 
> object will have.  Should IDriver's car attribute be a schema.Object or 
> a schema.Choice?

Have a look at the package zc.relation and for a simple use of 
zc.relation use lovely.relation which provides relation properties for 
your objects.

Jürgen



More information about the Zope3-users mailing list