Merged in fix to duplicate referential integrity chack problem

This commit is contained in:
sb 2008-07-23 08:21:49 +00:00
parent 5a1a2e2b9f
commit 953c7fedfe

View file

@ -12,7 +12,7 @@
Convert ADL to MS-SQL Convert ADL to MS-SQL
$Author: sb $ $Author: sb $
$Revision: 1.9 $ $Revision: 1.10 $
--> -->
<xsl:output indent="no" encoding="UTF-8" method="text"/> <xsl:output indent="no" encoding="UTF-8" method="text"/>
@ -103,7 +103,7 @@
-- <xsl:value-of select="$product-version"/> -- <xsl:value-of select="$product-version"/>
-- --
-- Database for application <xsl:value-of select="@name"/> version <xsl:value-of select="@version"/> -- Database for application <xsl:value-of select="@name"/> version <xsl:value-of select="@version"/>
-- Generated for MS-SQL 2000+ using adl2mssql.xslt <xsl:value-of select="substring('$Revision: 1.9 $', 12)"/> -- Generated for MS-SQL 2000+ using adl2mssql.xslt <xsl:value-of select="substring('$Revision: 1.10 $', 12)"/>
-- THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT IT. -- THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT IT.
-- --
-- <xsl:value-of select="@revision"/> -- <xsl:value-of select="@revision"/>
@ -204,8 +204,13 @@
<xsl:choose> <xsl:choose>
<xsl:when test="//adl:entity[@name=$farside]//adl:property[@farkey=$keyfield and @entity=$nearside]"> <xsl:when test="//adl:entity[@name=$farside]//adl:property[@farkey=$keyfield and @entity=$nearside]">
<!-- there's a 'list' property pointing the other way; let it do the heavy hauling --> <!-- there's a 'list' property pointing the other way; let it do the heavy hauling -->
<!-- list with farkey -->
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:when test="//adl:entity[@name=$farside]//adl:property[@entity=$nearside and not( @farkey)]">
<!-- there's a 'list' property pointing the other way; let it do the heavy hauling -->
<!-- list with no farkey -->
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="foreignkey"> <xsl:call-template name="foreignkey">
<xsl:with-param name="nearside" select="$nearside"/> <xsl:with-param name="nearside" select="$nearside"/>
<xsl:with-param name="farside" select="$farside"/> <xsl:with-param name="farside" select="$farside"/>