Parameter list in native query for IN ( 'a' , 'b' , 'c') condition
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2014 07:06 AM
Hello,
I tried to use parameter in native query
SELECT task.* FROM act_ru_task task, act_ru_identitylink link WHERE task.ID_ = link.TASK_ID_ AND link.GROUP_ID_ IN( 'a', 'b' )
but I m not able to set more then one word in a parameter.
This ones are not working
…. ink.GROUP_ID_ IN( #{candidate} )").parameter("candidate", "a, b") …
…. ink.GROUP_ID_ IN( #{candidate} )").parameter("candidate", listOfStrings) …
There is work around to not use parameter and just append it to string, but its not the way how it should be.
I m using MySQL.
I tried to use parameter in native query
SELECT task.* FROM act_ru_task task, act_ru_identitylink link WHERE task.ID_ = link.TASK_ID_ AND link.GROUP_ID_ IN( 'a', 'b' )
but I m not able to set more then one word in a parameter.
This ones are not working
…. ink.GROUP_ID_ IN( #{candidate} )").parameter("candidate", "a, b") …
…. ink.GROUP_ID_ IN( #{candidate} )").parameter("candidate", listOfStrings) …
There is work around to not use parameter and just append it to string, but its not the way how it should be.
I m using MySQL.
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2014 07:16 AM
Fair point, right now a List parameter is not supported. Would be a good feature to add.
Best regards,
Best regards,
