You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Mylene <my...@gmail.com> on 2013/10/16 15:22:11 UTC

select... where ... in

Hi,

I have a CriteriaQuery, in which I build a "where id in  ids" kind of query.
Ids is ArrayList<Long>()
Database is Oracle 10.

I get an exception on a real long ArrayList (some 100.000 entries).
When I check the resulting query, it seems to be translated to

select * from table t where (t.id=? OR t.id=? OR t.id=? ...)
100.000 OR's seems overdone - and I guess that's why the query fails.

Is this normal OpenJPA behaviour, or does anyone have a clue what is
happening?

Thanks,

Mylène