|
From: <mcu...@us...> - 2009-07-01 16:57:14
|
Revision: 1397
http://orm.svn.sourceforge.net/orm/?rev=1397&view=rev
Author: mcurland
Date: 2009-07-01 16:57:02 +0000 (Wed, 01 Jul 2009)
Log Message:
-----------
Improve generated name for alternative identifier columns representing partially separated subtypes. This occurs when a subtype with multiple supertypes has some absorbed supertypes and some separated. A future fix will completely eliminate these columns in almost all cases. refs #338
Modified Paths:
--------------
trunk/RelationalModel/OialDcilBridge/NameGeneration.cs
trunk/Setup/Readme.htm
Modified: trunk/RelationalModel/OialDcilBridge/NameGeneration.cs
===================================================================
--- trunk/RelationalModel/OialDcilBridge/NameGeneration.cs 2009-06-23 01:12:22 UTC (rev 1396)
+++ trunk/RelationalModel/OialDcilBridge/NameGeneration.cs 2009-07-01 16:57:02 UTC (rev 1397)
@@ -1952,6 +1952,7 @@
ConceptTypeChild child = childPath[iChild];
ConceptTypeAssimilatesConceptType assimilation = child as ConceptTypeAssimilatesConceptType;
bool reverseAssimilation = false;
+ bool forwardToReverseTransition = false;
bool towardsSubtype = false;
if (assimilation != null)
{
@@ -1976,6 +1977,12 @@
if (0 != (stepFlags & ColumnPathStepFlags.ForwardAssimilation))
{
// Keep going forward
+ if (0 != (stepFlags & ColumnPathStepFlags.AssimilationIsSubtype) &&
+ AssimilationMapping.GetAbsorptionChoiceFromAssimilation(assimilation) != AssimilationAbsorptionChoice.Absorb &&
+ comingFromConceptType == (0 == (stepFlags & ColumnPathStepFlags.AssimilationTowardsSubtype) ? assimilation.AssimilatedConceptType : assimilation.AssimilatorConceptType))
+ {
+ forwardToReverseTransition = true;
+ }
}
else if (0 != (stepFlags & ColumnPathStepFlags.ReverseAssimilation))
{
@@ -2038,13 +2045,22 @@
bool tailIsSubtype = 0 != (tailFlags & ColumnPathStepFlags.AssimilationIsSubtype);
if (tailIsSubtype && assimilationIsSubtype)
{
- if (secondarySubtype && 0 == (tailFlags & ColumnPathStepFlags.NonPreferredSubtype))
+ if (forwardToReverseTransition)
{
- tailNode.Value = new ColumnPathStep(pathStep.FromRole, pathStep.ObjectType, pathStep.AlternateObjectType, tailFlags | ColumnPathStepFlags.NonPreferredSubtype);
+ flags |= ColumnPathStepFlags.DeclinedAssimilation;
+ targetRole = towardsSubtype ? targetRole.OppositeRoleAlwaysResolveProxy.Role : nonAssimilationTargetRole;
+ processAsFactType = true;
}
- // If this is a subtype chain, then keep going, using the first
- // subtype in the chain as a node used in the final name.
- continue;
+ else
+ {
+ if (secondarySubtype && 0 == (tailFlags & ColumnPathStepFlags.NonPreferredSubtype))
+ {
+ tailNode.Value = new ColumnPathStep(pathStep.FromRole, pathStep.ObjectType, pathStep.AlternateObjectType, tailFlags | ColumnPathStepFlags.NonPreferredSubtype);
+ }
+ // If this is a subtype chain, then keep going, using the first
+ // subtype in the chain as a node used in the final name.
+ continue;
+ }
}
else if (assimilationObjectification != null)
{
Modified: trunk/Setup/Readme.htm
===================================================================
--- trunk/Setup/Readme.htm 2009-06-23 01:12:22 UTC (rev 1396)
+++ trunk/Setup/Readme.htm 2009-07-01 16:57:02 UTC (rev 1397)
@@ -41,7 +41,7 @@
</ul>-->
<hr/>
<h2>June 2009 CTP Changes</h2>
-<div>The June 2009 CTP release includes all modifications through changeset 1396. Full changeset descriptions can be found at the <a href="http://orm.svn.sourceforge.net/viewvc/orm/trunk/?view=log">sourceforge code repository</a> (be patient with this link, the page contains a full changeset history).</div>
+<div>The June 2009 CTP release includes all modifications through changeset 1397. Full changeset descriptions can be found at the <a href="http://orm.svn.sourceforge.net/viewvc/orm/trunk/?view=log">sourceforge code repository</a> (be patient with this link, the page contains a full changeset history).</div>
<ul>
<li><a href="#Sample population mandatory error activation 2009-06">Sample population mandatory error activation</a> </li>
<li><a href="#Relational compound name interpretation 2009-06">Relational compound name interpretation</a> </li>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|