aspose file tools*
The moose likes Object Relational Mapping and the fly likes MyBatis.How to pass int array as value of parameterType attribute in select tag? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "MyBatis.How to pass int array as value of parameterType attribute in select tag?" Watch "MyBatis.How to pass int array as value of parameterType attribute in select tag?" New topic
Author

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

Volodymyr Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 481
    
    1

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!


True person is moral, false is right!
Volodymyr Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 481
    
    1

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MyBatis.How to pass int array as value of parameterType attribute in select tag?
 
Similar Threads
problematic method call
array copy question
Arrays doubt
Updated MulitThreads Problem
Sorting an array