Hibernate version:3.2.5ga
I am experiencing what "appears" to be a bug in the SQL generation during a bulk update HQL query.
Given the following two HQL statements:
A) update MailServer m set m.journal=null where m.journal.id=:mailboxId
AND
B) update MailServer m set m.journal=null where m.journal.sync=:enabled
The former works, while the latter fails with the following error:
Code:
Syntax error: Encountered "," at line 1, column 30.
The key differences between the two queries are:
1. Query A is using an integer value, which is also a primary key value,
2. Query B is using a boolean field as the parameter
The raw SQL produced by hibernate in each case is:
A) update Recipient set mailboxId=null where mailboxId=?
B) update Recipient, set mailboxId=null where sync=?
We can see that in the latter query there is a weird comma in the middle of the sql, which causes the error.
This is running on an Apache Derby database (v10.3) using the org.hibernate.dialect.DerbyDialect dialect.
Assuming this is a hibernate problem, does anyone know of a work around? I need/want to do a bulk update because the current solution (one-by-one) is just too slow (to the point it's unworkable for us).
Thanks.[/list]