Skip to content

Constructor id arguments don't need to be listed first #2541

Closed
@Condor70

Description

@Condor70

I was working on using MyBatis with pre-existing classes and i ran into the problem that according to the DTD idArgs need to come before args in the constructor.

This following example doesn't validate, although MyBatis doesn't actually have this restriction:

<resultMap id="MyClass" type="test.MyClass">
	<constructor> <!-- Error: The content of element type "constructor" must match "(idArg*,arg*)". -->
		<arg column="name" javaType="string" />
		<idArg column="id" javaType="string" />
	</constructor>
</resultMap>

Can mybatis-3-mapper.dtd be changed from:
<!ELEMENT constructor (idArg*,arg*)>
to
<!ELEMENT constructor ((idArg|arg)*)>

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions