I am using Hibernate 3.0.5
The issue is that we want to executes some bulk deletes on the system using Native SQL.
Code:
SQLQuery query = session.createSQLQuery("delete from some_table");query.executeUpdate();
But this query is casing an error
Code:
Caused by: java.lang.UnsupportedOperationException: Update queries only supported through HQL at org.hibernate.impl.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:749)
I read other discussions in the forum that this is not possible using H3.0, but should be possible in H3.1 (!!??) So I upgraded to H3.1rc3, but the same error occurred.
My question: Will this be possible in H3.1 or will I be forced to go down the route of executing the batch deletes using the JDBC connection?