You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Mark McConnell (JIRA)" <ib...@incubator.apache.org> on 2007/01/18 15:56:30 UTC
[jira] Created: (IBATISNET-203) SqlMap.xsd element "result" in
element "resultMap" is not required but marked as required from schema.
SqlMap.xsd element "result" in element "resultMap" is not required but marked as required from schema.
------------------------------------------------------------------------------------------------------
Key: IBATISNET-203
URL: https://issues.apache.org/jira/browse/IBATISNET-203
Project: iBatis for .NET
Issue Type: Bug
Components: DataMapper
Affects Versions: DataMapper 1.5.1
Environment: All tried.
Reporter: Mark McConnell
Priority: Minor
We often only use constructors and do not want to create properties to set data via iBatis. This is possible, however, the schema requires at least one "result". As seen below "result" is not marked with a minOccurs="0" this creates a warning in dev environments since the xml doesn't match the schema.
OLD SqlMap.xsd
<xs:element name="resultMap">
<xs:complexType>
<xs:sequence>
<xs:element ref="constructor" minOccurs="0" maxOccurs="1"/>
<xs:element ref="result" maxOccurs="unbounded"/>
<xs:element ref="discriminator" minOccurs="0" maxOccurs="1"/>
<xs:element ref="subMap" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute name="class" type="xs:string" use="required"/>
<xs:attribute name="extends" type="xs:string"/>
</xs:complexType>
</xs:element>
NEW SqlMap.xsd
<xs:element name="resultMap">
<xs:complexType>
<xs:sequence>
<xs:element ref="constructor" minOccurs="0" maxOccurs="1"/>
<xs:element ref="result" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="discriminator" minOccurs="0" maxOccurs="1"/>
<xs:element ref="subMap" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute name="class" type="xs:string" use="required"/>
<xs:attribute name="extends" type="xs:string"/>
</xs:complexType>
</xs:element>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (IBATISNET-203) SqlMap.xsd element "result" in
element "resultMap" is not required but marked as required from schema.
Posted by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/IBATISNET-203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gilles Bayon closed IBATISNET-203.
----------------------------------
Resolution: Cannot Reproduce
Fix Version/s: DataMapper 1.6
Assignee: Gilles Bayon
Already done in SVN
> SqlMap.xsd element "result" in element "resultMap" is not required but marked as required from schema.
> ------------------------------------------------------------------------------------------------------
>
> Key: IBATISNET-203
> URL: https://issues.apache.org/jira/browse/IBATISNET-203
> Project: iBatis for .NET
> Issue Type: Bug
> Components: DataMapper
> Affects Versions: DataMapper 1.5.1
> Environment: All tried.
> Reporter: Mark McConnell
> Assigned To: Gilles Bayon
> Priority: Minor
> Fix For: DataMapper 1.6
>
>
> We often only use constructors and do not want to create properties to set data via iBatis. This is possible, however, the schema requires at least one "result". As seen below "result" is not marked with a minOccurs="0" this creates a warning in dev environments since the xml doesn't match the schema.
> OLD SqlMap.xsd
> <xs:element name="resultMap">
> <xs:complexType>
> <xs:sequence>
> <xs:element ref="constructor" minOccurs="0" maxOccurs="1"/>
> <xs:element ref="result" maxOccurs="unbounded"/>
> <xs:element ref="discriminator" minOccurs="0" maxOccurs="1"/>
> <xs:element ref="subMap" minOccurs="0" maxOccurs="unbounded"/>
> </xs:sequence>
> <xs:attribute name="id" type="xs:string" use="required"/>
> <xs:attribute name="class" type="xs:string" use="required"/>
> <xs:attribute name="extends" type="xs:string"/>
> </xs:complexType>
> </xs:element>
> NEW SqlMap.xsd
> <xs:element name="resultMap">
> <xs:complexType>
> <xs:sequence>
> <xs:element ref="constructor" minOccurs="0" maxOccurs="1"/>
> <xs:element ref="result" minOccurs="0" maxOccurs="unbounded"/>
> <xs:element ref="discriminator" minOccurs="0" maxOccurs="1"/>
> <xs:element ref="subMap" minOccurs="0" maxOccurs="unbounded"/>
> </xs:sequence>
> <xs:attribute name="id" type="xs:string" use="required"/>
> <xs:attribute name="class" type="xs:string" use="required"/>
> <xs:attribute name="extends" type="xs:string"/>
> </xs:complexType>
> </xs:element>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira