开发者

Limiting iBATIS iteration over a list/Array based on numeric condition

开发者 https://www.devze.com 2023-02-01 00:38 出处:网络
I have been using iBatis to iterate over a list of items in a select statement as follows: <iterate pr开发者_StackOverflow社区operty=\"someCollection\" open=\"(\" close=\")\" conjunction=\",\">

I have been using iBatis to iterate over a list of items in a select statement as follows:

<iterate pr开发者_StackOverflow社区operty="someCollection" open="(" close=")" conjunction=",">
#someCollection[]#
</iterate>

While doing this i have run into an error: "java.sql.SQLException: ORA-01795: maximum number of expressions in a list is 1000"

Now my list obviously has more than 1000 items (17000 to be exact), so I was wondering if there is a way to split up this iteration into 1000 iterations at a time, and if so what condition would I need to add?

If im not thinking along the right lines of this proposed solution, can anyone propose a better one?

Many thanks


I'd put your 17000 items in a table and use a subselect.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号