I'm having a problem with MyBatis execute query, I'm triying to execute sending 3 variables but I get an error, I know that this is the problem because when I only send one variable it works. I find that all the people send objects instead of variables when they have more than one, but I don't want to create an object because I have multiple mybatis executes and I can't create an object for eveyone because they have different variables.
So there's anyway to fix it? I can send 2 variables? Or I must create an object?
Here's the code
public List consultaRepresentacions(final int representat, final int representant, final String app){
List representacions = myBatisTemplate.execute(ReproDao.class, new MyBatisDaoCallback<List>() {
@Override
public List execute(MyBatisDao dao) {
return ((ReproDao) dao).consultaRepros(representat, representant, app);
}
});
return representacions;
}
Thanks in advise.