Can you provide some more context? What is the JPQL that is being executed?
What version of OpenJPA are you running?

Thanks,
Rick

On Mon, Apr 16, 2012 at 8:39 AM, mwalter <marc.wal...@sbb.ch> wrote:

> Here's a part of a SQL statement being generated by OpenJPA using Oracle
> database:
>
> ... WHERE (t0.ID IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
>        ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) OR t0.ID IN
>        () OR t0.ID IN () OR t0.ID IN () OR t0.ID IN ())
>    ORDER BY t0.ID ASC
> [params=(long) 5, (long) 6, (long) 812, (long) 811, (long) 810, (long) 808,
> (long) 807, (long) 806, (long) 780, (long) 778, (long) 757, (long) 738,
> (long) 737, (long) 721, (long) 720, (long) 719, (long) 718, (long) 699,
> (long) 698, (long) 683, (long) 682, (long) 680, (long) 638, (long) 599,
> (long) 598, (long) 597, (long) 3]} [code=936, state=42000]
>
> Of course this leads to ORA-00936: missing expression. Has anybody
> experienced something like that?
> I have absolutely no idea why a wrong statement is being generated. The
> first part is okay, but why does OpenJPA add some empty INs after that?
> The thing is the statement fails using Oracle 11g, using H2 it works and
> the
> OR parts are gone. Weird stuff!
> Thank you for any hint...!
>

-- 
*Rick Curtis*

Reply via email to