I am also having problems to get my bulk deletes running while migrating from Hibernate 2.1 to 3.0 rc1. Database is DB2 or HSQL.
The NullPointerException seems to occur if the query contains a "from" token, because the ANTLR HQL/SQL Query Parser adds an additional implicit "from" AST node which results in the NPE (HqlSqlBaseWalker line: 2193).
Try to you use
Code:
String deleteByNavKeyQ = "delete SecurityGroupLink sgl where sgl.Id.LinkKey = ?";
as query string. This will bring you to the next problem (that's were I currently hang). I get a SQLGrammarException complaining about the table alias in the generated SQL statement.
But according to Steves replies (see also
a question about Hibernate 3) I conclude that this issue was fixed in the meantime.
Regards,
Ralf