JPA - Native Queries : IN condition fails

Bug #767500 reported by Timo Westkämper on 2011-04-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Querydsl
Fix Released
Undecided
Unassigned

Bug Description

SQLTemplates templates = new MySQLTemplates();
HibernateSQLQuery query = new HibernateSQLQuery(session, templates);

Collection collection = new ArrayList();
collection.add("test1");
collection.add("test");

query.from(example).where(example.column.in(collection));

it's returning

select example.*
from example example
where example.column in ?, ?

It fails due to MySQL needing parens - in (?,?)

Fixed in SVN trunk

description: updated
Changed in querydsl:
status: New → Fix Committed
summary: - JPA/SQL : In query fails
+ JPA - Native Queries : IN condition fails

Released in 2.2.0-beta4

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers