From: <mcu...@us...> - 2007-08-30 17:30:28
|
Revision: 1104 http://orm.svn.sourceforge.net/orm/?rev=1104&view=rev Author: mcurland Date: 2007-08-30 10:30:26 -0700 (Thu, 30 Aug 2007) Log Message: ----------- Changeset [1101] began setting ConceptTypeAssimilatesConceptType.IsPreferredForTarget, which was never set before. The conceptual database bridge crashes when this property is set, so ignore it for now. Temporary fix so the rest of us can keep working. refs #327 Modified Paths: -------------- trunk/ORMModel/ObjectModel/ObjectType.cs trunk/Oial/ORMOialBridge/ORMOialBridgePermuter.cs trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs trunk/RelationalModel/OialDcilBridge/OialDcilBridge.DeserializationFixupListeners.cs Modified: trunk/ORMModel/ObjectModel/ObjectType.cs =================================================================== --- trunk/ORMModel/ObjectModel/ObjectType.cs 2007-08-30 17:27:46 UTC (rev 1103) +++ trunk/ORMModel/ObjectModel/ObjectType.cs 2007-08-30 17:30:26 UTC (rev 1104) @@ -1569,20 +1569,17 @@ } } /// <summary> - /// Indicates if this <see cref="ObjectType"/> is implied independent. + /// Indicates if this <see cref="ObjectType"/> is either explicitly marked as <see cref="IsIndependent">independent</see> + /// or is implicitly independent because it plays no roles outside of its preferred identifier. /// </summary> - public bool IsImpliedIndependent() + public bool TreatAsIndependent { - return !this.IsIndependent && this.ImpliedMandatoryConstraint == null && this.AllowIsIndependent(false); + get + { + return this.IsIndependent || (this.ImpliedMandatoryConstraint == null && this.AllowIsIndependent(false)); + } } /// <summary> - /// Indicates if this <see cref="ObjectType"/> is either implied independent or explicity independent. - /// </summary> - public bool IsAnyIndependent() - { - return this.IsIndependent || this.IsImpliedIndependent(); - } - /// <summary> /// Test if the <see cref="IsIndependent"/> property can be set to true. /// </summary> /// <param name="throwIfFalse">Set to <see langword="true"/> to throw an exception instead of returning false.</param> Modified: trunk/Oial/ORMOialBridge/ORMOialBridgePermuter.cs =================================================================== --- trunk/Oial/ORMOialBridge/ORMOialBridgePermuter.cs 2007-08-30 17:27:46 UTC (rev 1103) +++ trunk/Oial/ORMOialBridge/ORMOialBridgePermuter.cs 2007-08-30 17:30:26 UTC (rev 1104) @@ -352,7 +352,7 @@ foreach (ObjectType objectType in chain.ObjectTypes) { - if (objectType.IsAnyIndependent()) + if (objectType.TreatAsIndependent) { predecidedObjectTypesThatAreIndependentOrSubtypesOrHaveNonPreferredIdentifierMappingsTowards[objectType] = null; } Modified: trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs =================================================================== --- trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs 2007-08-30 17:27:46 UTC (rev 1103) +++ trunk/Oial/ORMOialBridge/OialModelIsForORMModel.cs 2007-08-30 17:30:26 UTC (rev 1104) @@ -1109,7 +1109,7 @@ private bool ObjectTypeIsConceptType(ObjectType objectType, FactTypeMappingDictionary factTypeMappings) { // If objectType is independent... - if (objectType.IsAnyIndependent()) + if (objectType.TreatAsIndependent) { return true; } Modified: trunk/RelationalModel/OialDcilBridge/OialDcilBridge.DeserializationFixupListeners.cs =================================================================== --- trunk/RelationalModel/OialDcilBridge/OialDcilBridge.DeserializationFixupListeners.cs 2007-08-30 17:27:46 UTC (rev 1103) +++ trunk/RelationalModel/OialDcilBridge/OialDcilBridge.DeserializationFixupListeners.cs 2007-08-30 17:30:26 UTC (rev 1104) @@ -587,7 +587,7 @@ foreach (ConceptTypeAssimilatesConceptType conceptTypeAssimilatesConceptType in ConceptTypeAssimilatesConceptType.GetLinksToAssimilatorConceptTypeCollection(conceptType)) { - if (conceptTypeAssimilatesConceptType.IsPreferredForTarget) + if (false && conceptTypeAssimilatesConceptType.IsPreferredForTarget) { prefferedConceptTypeChildrenList.Add(conceptTypeAssimilatesConceptType); break; @@ -658,7 +658,7 @@ TableIsPrimarilyForConceptType.GetTable(assimilation.AssimilatorConceptType).UniquenessConstraintCollection.Add(mappedConstraint); } - else if (assimilation.IsPreferredForTarget) + else if (false && assimilation.IsPreferredForTarget) { if (isPreferredForChildFound == false) { @@ -879,7 +879,7 @@ } foreach (ConceptTypeAssimilatesConceptType conceptTypeAssimilatesConceptType in ConceptTypeAssimilatesConceptType.GetLinksToAssimilatorConceptTypeCollection(conceptType)) { - if (conceptTypeAssimilatesConceptType.IsPreferredForTarget) + if (false && conceptTypeAssimilatesConceptType.IsPreferredForTarget) { foreach (Column target in ColumnHasConceptTypeChild.GetColumn((ConceptTypeChild)conceptTypeAssimilatesConceptType)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |