Re: [Modeling-users] Re: attaching information to a relation
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2003-08-09 12:35:28
|
I wrote: > The problem is that you were probably misled here by the names: since > you read 'typed_assocs' and 'user', you tend to think that associations > are resp. to-many and to-one, and since the cardinalities are implicit > here, that makes it harder to see the problem. In fact,=20 >=20 > Association('User','TypedAssoc', > relations=3D['typed_assocs','user'], > delete=3D['cascade','nullify'], > keys=3D['id','FK_User_id'] >=20 > is equivalent to (see Association's defaults): >=20 > Association('User','TypedAssoc', > relations=3D['typed_assocs','user'], > multiplicity=3D[ [0,1], [0,None] ], > delete=3D['cascade','nullify'], > keys=3D['id','FK_User_id'] >=20 > and this version makes the pb appears clearly, doesn't it? ;) Now I really wonder if this was a so good idea to allow the multiplicity to be implicit. If you remember the discussion on this topic, we made it implicit becauser it allows a more concise declarations of associations. However, this obviously lead, leads (and will lead) to problems, just because we human-beings interpret things a lot more than machines do :) It may be really better to make the multiplicity explicit in associations (so that it is required in each declaration of association), and allow it to be either E1 <<---> E2 (the only possible case for now) or E1 <--->> E1.=20 What do you think, all? Regards, -- S=E9bastien. |