Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Kumar Raja
Ranch Hand
Posts: 547
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