wood burning stoves 2.0*
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
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: 505
    
    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: 505
    
    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
 
Don't get me started about those stupid light bulbs.
 
subject: MyBatis.How to pass int array as value of parameterType attribute in select tag?
 
Similar Threads
Arrays doubt
Sorting an array
problematic method call
Updated MulitThreads Problem
array copy question