how to defint Multiple parameterType?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how to defint Multiple parameterType?

maven apache
<select id="selectPerson" parameterType="int" resultType="hashmap">
  SELECT * FROM PERSON WHERE ID = #{id}
</select>

This is the select config in the document, I wonder if the MyBatis
just support one parameterType?
For example, if I want to execute:
select * from user where id=2 name='name'
So what is the parameterType? int or string?