I am trying to formulate a dynamic query in MyBatis-3.2. The query involves an 'IN' clause where a list of items is passed. MyBatis does support 'IN' clause via foreach construct. The query is going to be used very frequently with variable sized list of items. Also, I do not want oracle to hard parse this sql query each time.
So, here are my concerns -
1) Foreach in MyBatis is hard parsed or soft parsed?
2) If it is soft parsed, when is the values substituted to the list of IN clause?
3) If it is hard parsed, is there a work around to support this use case? Can we bind the list to a variable to support soft parsing in this case?
I have search on web regarding all these concerns but could not find any luck. Any comments on this would be of great help. :)
Thanks in Advance,