Re: [Modeling-users] Some more corrections to the documentation (manual) and some questios
Status: Abandoned
Brought to you by:
sbigaret
|
From: Sebastien B. <sbi...@us...> - 2004-02-25 20:45:38
|
Hi ,
"Ernesto Revilla" <er...@si...> wrote:
> Question: in secion 2.4.8 Association, in the 'Important' part it says:
> Association objects always define a to-one association from the first ent=
ity to the second entity, and an inverse to-many relationship from the seco=
nd entity to the first one.
>=20
> Is this true, although the multiplicity has no be defined as:
> multiplicity=3D[ [0, 1], [0, None] ],
> like
> multiplicity=3D[ [0, None], [0, 1] ],
>=20
> ?
Yes, this is true, if you try to inverse toOne/toMany multiplicities
you'll get a "ValueError: invalid multiplicity dst->src: should be
toMany"
>=20
> If the foreign key value must not be null, e.g. like the 'customer' field=
. for invoices, orders, etc., the multiplicity would be: [1, =
1], [0, None]
> as in:
> Association('Invoice', 'Customer', relations=3D['customer','invoices'=
],
> multiplicity=3D[ [1, 1] , [0, None] ],
> delete=3D['nullify','deny'])
> ??
Right: a lower bound=3D=3D1 requires any invoice to have exactly one custom=
er.
> Generation of DB-Schema with mdl_generate_DB_schema.py:
> When I do:
> python p:mdl_generate_DB_schema.py -c -v -C modelo.py
>=20
> I get:
> Error: option -C requires --admin-connection-dict
> 1.) I don't access the DB (-c option) so a admin dictionary should not be=
needed.
> 2.) there is no --admin-connection-dict parameter, only a --admin-dsn par=
ameter
You're absolutely right --for both the typo. and the fact that we
should probably just issue a warning if -c is set while --admin-dsn
would be required without -c.
And thank you for the doc. corrections and the enhancement proposal.
I'll look at them closely this week-end and integrate the corrections
then. Thanks again.
-- S=E9bastien.
|