Uploaded image for project: 'iBatis for .NET'
  1. iBatis for .NET
  2. IBATISNET-246

SqlMap.xsd is incorrect: sql element can have an include sub-element

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • DataMapper 1.6.1
    • DataMapper 1.6.2
    • DataMapper
    • None

    Description

      The original SqlMap.xsd states that an "sql" element can not have an "include" sub-element which is not true. In fact the code snippet below is perfectly legal and working.

      <sql id="TestTable_SelectFields">
      SELECT Id, description
      </sql>

      <sql id="TestTable_BaseSQL">
      <include refid="TestTable_SelectFields" />
      FROM TestTable
      </sql>

      An updated and working schema is reportef below (note the new linw with <xs:element ref="include"/>):

      <xs:element name="sql">
      <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="include"/>
      <xs:element ref="dynamic"/>
      <xs:element ref="isEmpty"/>
      <xs:element ref="isEqual"/>
      <xs:element ref="isGreaterEqual"/>
      <xs:element ref="isGreaterThan"/>
      <xs:element ref="isLessThan"/>
      <xs:element ref="isLessEqual"/>
      <xs:element ref="isNotEmpty"/>
      <xs:element ref="isNotEqual"/>
      <xs:element ref="isNotNull"/>
      <xs:element ref="isNotParameterPresent"/>
      <xs:element ref="isNotPropertyAvailable"/>
      <xs:element ref="isNull"/>
      <xs:element ref="isParameterPresent"/>
      <xs:element ref="isPropertyAvailable"/>
      <xs:element ref="iterate"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string" use="required"/>
      </xs:complexType>
      </xs:element>

      Attachments

        Activity

          People

            Unassigned Unassigned
            iltasso Andrea Tassinari
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: