Re: [Modeling-users] bug 841315: multiplicity constraints, [1,1]
Status: Abandoned
Brought to you by:
sbigaret
|
From: Mario R. <ma...@ru...> - 2003-11-14 08:24:43
|
Hi, I have installed this 2-in-1 patch, and confirm that the first test (% python ./run.py) succeeds, and that the warnings are not generated when I regenerate all from my model. Thanks! mario >> thanks... Created bug 841315 for this: >> "Model associations do not set the multiplicity bounds" >> >> I have installed the patch, but there are some problems. >> >> First, the first installation test fails: >> % python ./run.py >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> FAIL: [PyModel] unqualified_relationships_with_inverse >> = ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "test_PyModel.py", line 393, in >> test_08_qualified_relationships_with_inverse >> self.check_model(model) >> File "test_PyModel.py", line 92, in check_model >> =20 >> self.failIf(fkStore.isRequired()!=3DtoStore.multiplicityLowerBound()) >> File >> "/BinaryCache/python/python-3.root~193/usr/lib/python2.2/=20 >> unittest.py", line >> 258, in failIf >> if expr: raise self.failureException, msg >> AssertionError > [...] > > Okay, thanks for reporting. In fact the test is right --it checks that > the PyModel does what is expected, i.e. that the FK, when = automatically > created, is mandatory/required when the multiplicity's lower bound is > 1. Since this correlation was not coded but the multiplicity is now > correctly forwarded, the test now fails ;) I've attached to bug ticket > #841315 the corresponding patch (it is an extension of the one I = posted > earlier today). That's a 2-in-1 bugfix, cool. > >> Then, for my model, on validation I get a warning for each >> such relationship, e.g: >> >> Object: Relationship A.b >> ------------------------------- >> * Warning(s): >> - relationship is mandatory but source attribute A.fkBId is not = =20 >> required > > Yes, this warning is "normal" in the bug context, it is due to the = fact > that the FK is not marked as mandatory as it should (in particular, =20= > this > makes mdl_generate_DB_schema.py mark the FK as a NOT NULL column). It > will disappear w/ the new patch applied. > > Please note: this is not integrated into cvs yet, I still need to = add > test for the other discovered bug --but this will be in the next > release for sure. > > Thanks for the report, > > -- S=E9bastien. |