Tested on Oracle 11g and as I expected, I could no reproduce the stalling behavior. An interesting tidbit is that Oracle generates a SQL statement like the following:
WHERE (ITEM_ID,PLANT_ID) IN ((?,?),(?,?),(?,?),...)
which the equivalent SQL Server's clause is:
WHERE ((ITEM_ID=? AND PLANT_ID=?) OR (ITEM_ID=? AND PLANT_ID=?) OR ... (ITEM_ID=? AND PLANT_ID=?))
the difference is controlled by the org.hibernate.dialect.Dialect#supportsRowValueConstructorSyntaxInInList since sql server doesn't support this syntax
... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ...
so, when there is a query say
where p.name in :nameList
where name is a embeddable , it will be translated to the sql you see
|