IN (a, b, c) as bind variables???
XenofonMar 30 2011 — edited Mar 31 2011Hi all,
this is actually a mixed JDBC/JPA with hibernate question. Still I have an Oracle database as backend, so it is seems this could be the appropriate forum:
my Java developer colleagues mean so see in the SQL.LOG generated by hiberate, that the values for an "IN ()" condition, which are being passed as a Java collection to the entity-manager-query, are being internally concatinated and then "bound" to the sql-statement as a single variable.
The generated SQL, found in the SQL.LOG, looks like "... IN (?)".
I was shocked! This of course has nothing to do anymore with real binding, which should look like "... IN (?,?,?,...)"!
Are you aware of this? Is this the hibernate way, or is it the JPA standard itself?
Clear is, from a database viewpoint, this not variable binding anymore.
Any thoughts on this?