Minor fix - was generating wrong initialiser for entiry properties where the key field of the entity was of type string.
This commit is contained in:
parent
4902e969c7
commit
b6823cb897
|
@ -8,8 +8,8 @@
|
|||
Transform ADL into C# entity classes
|
||||
|
||||
$Author: sb $
|
||||
$Revision: 1.22 $
|
||||
$Date: 2009-05-04 15:37:37 $
|
||||
$Revision: 1.23 $
|
||||
$Date: 2009-05-07 09:50:55 $
|
||||
-->
|
||||
|
||||
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
||||
|
@ -70,7 +70,7 @@
|
|||
// (c)2007 Cygnet Solutions Ltd
|
||||
//
|
||||
// Automatically generated from application description using
|
||||
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.22 $', 10)"/>
|
||||
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.23 $', 10)"/>
|
||||
//
|
||||
// <xsl:value-of select="/adl:application/@revision"/>
|
||||
//
|
||||
|
@ -97,7 +97,7 @@
|
|||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Automatically generated from description of group <xsl:value-of select="@name"/>
|
||||
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.22 $', 10)"/>.
|
||||
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.23 $', 10)"/>.
|
||||
///
|
||||
/// DO NOT EDIT THIS FILE!
|
||||
/// </remarks>
|
||||
|
@ -123,7 +123,7 @@
|
|||
// (c)2007 Cygnet Solutions Ltd
|
||||
//
|
||||
// Automatically generated from application description using
|
||||
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.22 $', 10)"/>
|
||||
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.23 $', 10)"/>
|
||||
//
|
||||
// <xsl:value-of select="/adl:application/@revision"/>
|
||||
//
|
||||
|
@ -149,7 +149,7 @@
|
|||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Automatically generated from description of entity <xsl:value-of select="@name"/>
|
||||
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.22 $', 10)"/>.
|
||||
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.23 $', 10)"/>.
|
||||
/// Note that manually maintained parts of this class may be defined in
|
||||
/// a separate file called <xsl:value-of select="@name"/>.manual.cs, q.v.
|
||||
///
|
||||
|
@ -430,6 +430,11 @@
|
|||
<xsl:with-param name="property" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="csharp-base-type">
|
||||
<xsl:call-template name="csharp-base-type">
|
||||
<xsl:with-param name="property" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="nullable-decoration">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@required='true'"/>
|
||||
|
@ -452,6 +457,9 @@
|
|||
<xsl:when test="$csharp-type = 'String'">
|
||||
= "<xsl:value-of select="@default"/>"
|
||||
</xsl:when>
|
||||
<xsl:when test="$csharp-base-type = 'String'">
|
||||
= "<xsl:value-of select="@default"/>"
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
= <xsl:value-of select="@default"/>
|
||||
</xsl:otherwise>
|
||||
|
@ -676,11 +684,6 @@
|
|||
/// <summary>
|
||||
/// auto generated primitive value for key property of type entity (experimental)
|
||||
/// </summary>
|
||||
<xsl:variable name="csharp-base-type">
|
||||
<xsl:call-template name="csharp-base-type">
|
||||
<xsl:with-param name="property" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
private <xsl:value-of select="concat( $csharp-base-type, ' _', @name, '_Value')"/> <xsl:choose>
|
||||
<xsl:when test="$csharp-base-type = 'Boolean'"> = false</xsl:when>
|
||||
<xsl:when test="$csharp-base-type = 'int'"> = 0</xsl:when>
|
||||
|
|
Loading…
Reference in a new issue