This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MyBatis.How to pass int array as value of parameterType attribute in select tag?

 
Volodymyr Lysenko
Ranch Hand
Posts: 511
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

How to write smth like this in mybatis

Attribute parameterType must contain int[] array which is referenced inside sql query.
Is this possible with mybatis?
Or how to achieve passing array as argument to select tag?

Thank you!
 
Volodymyr Lysenko
Ranch Hand
Posts: 511
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finally I found that the only way to pass multiple parameters to query in XML is via Map.

In XML this map is used as follows:

Details are at http://ibatis.10938.n7.nabble.com/Advance-Warning-API-Change-in-iBATIS-3-Beta-4-td16604.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic