Closed malinink closed 7 years ago
I expect that if mapper interface method have annotations like
@ResultType
- that it will be used with priority. Now - mybatis try to instantiate interface object, and fails.I expect that if relation presents in
@Params
- that javaType and typeHandler will works, but now they don't
Both expectations are wrong 😔 Please read the documentation for their usage. http://www.mybatis.org/mybatis-3/java-api.html
Closing as it's not a bug.
MyBatis version
3.4.2
Database vendor and version
PostgreSQL 9.5
Test case or example project
In the case of usage SOLID principles to write our code with mybatis configuration in annotations I have met strange problems with
@Params
and@ResultType
annotations.I have created project with 3 PR that demonstrates that issues. https://github.com/malinink/mybatis3-test (all tests passed)
On each usecasse I create PR. https://github.com/malinink/mybatis3-test/pulls
Steps to reproduce
Expected result
@ResultType
- that it will be used with priority. Now - mybatis try to instantiate interface object, and fails.@Params
- thatjavaType
andtypeHandler
will works, but now they don'tActual result
Tests fails until I use class names in both: POJO entities and they mappers.