Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use a custom class in parameterType and as a resultMap using MyBatis  RSS feed

 
Kumar Raja
Ranch Hand
Posts: 548
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

Assuming that we have a stored procedure that takes some parameters and returns a resultset.

Lets assume we have something like below


In the above example, the inputs are sent as Map, as defined in parameterType = 'map' and the output returned is of type Output_ResultMap which is a structure defined.

If I want to pass a custom class instead of Map, like say

Class MyClass
{
String param1;
String param2;
}
and output as a separate class like
Class Output{
/* some fields */

}

How do I define the parameterType and resultType

Thanks

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!