openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwalter <marc.wal...@sbb.ch>
Subject Wrong SQL statement being generated
Date Mon, 16 Apr 2012 13:39:49 GMT
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...!

--
View this message in context: http://openjpa.208410.n2.nabble.com/Wrong-SQL-statement-being-generated-tp7470306p7470306.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message