Win a copy of Kotlin in Action this week in the Kotlin 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
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


It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!