mybatis not support overload?
No.
After not support it ?
No.
Eduardo once tried and thought it was not a good idea.
https://github.com/mybatis/old-google-code-issues/issues/231
I also agree with him.
For example, when there are two methods in Java mapper interface...
User selectUser(Integer id);
User selectUser(String name);
... how would you specify the statement id in the following XML mapper?
<select id="?" resultType="User">
select id, name from user where id = #{id}
</select>
<select id="?" resultType="User">
select id, name from user where name = #{name}
</select>
Overloading is useful, but it just does not fit the current MyBatis design.
By the way, please post your next question to the mailing list.
We use GitHub Issues only to track bugs and feature requests.
Thank you!
Most helpful comment
No.
Eduardo once tried and thought it was not a good idea.
https://github.com/mybatis/old-google-code-issues/issues/231
I also agree with him.
For example, when there are two methods in Java mapper interface...
... how would you specify the statement id in the following XML mapper?
Overloading is useful, but it just does not fit the current MyBatis design.
By the way, please post your next question to the mailing list.
We use GitHub Issues only to track bugs and feature requests.
Thank you!