From: <mcu...@us...> - 2007-09-10 22:57:08
|
Revision: 1116 http://orm.svn.sourceforge.net/orm/?rev=1116&view=rev Author: mcurland Date: 2007-09-10 15:57:11 -0700 (Mon, 10 Sep 2007) Log Message: ----------- Temporary workaround to 'independent object types should not have implied mandatory roles'. Ignore single role implied mandatories on independent object types. The full fix is much riskier and will be done in the future. refs #330 Modified Paths: -------------- trunk/ORMModel/ObjectModel/Role.cs Modified: trunk/ORMModel/ObjectModel/Role.cs =================================================================== --- trunk/ORMModel/ObjectModel/Role.cs 2007-09-10 22:55:47 UTC (rev 1115) +++ trunk/ORMModel/ObjectModel/Role.cs 2007-09-10 22:57:11 UTC (rev 1116) @@ -182,7 +182,11 @@ case ConstraintType.ImpliedMandatory: if (roleSequence.RoleCollection.Count == 1) { - return (MandatoryConstraint)constraint; + MandatoryConstraint mandatoryConstraint = (MandatoryConstraint)constraint; + ObjectType objectType; + return (null != (objectType = mandatoryConstraint.ImpliedByObjectType) && objectType.IsIndependent) ? + null : + mandatoryConstraint; } break; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |