Hibernate version: 3.0.5
Code between sessionFactory.openSession() and session.close():
String hqlDelete = "delete DataValue where source = :source";
int deletedDataValues = session.createQuery( hqlDelete )
.setString( "source", source )
.executeUpdate();
return deletedDataValues;
Name and version of the database you are using: HSQLDB v. 1.7.3.3
Hi,
I was wondering if Query.executeUpdate() always return the number of deleted entities, or of this may depend on the database I'm using? The code above always return 0 (when testing with hsqldb), but all the entities that matches the query are deleted.
--
Cheers,
Kristian
|