I have marked a particular class/table as mutable, because the business logic dictates that this historical row can never be updated. This gives me some 2nd level cache dirty-checking optimisation and makes the intention of my code, clearer.
<class name="FooHistory" table="FooHistory" mutable="false">
Now, I need to delete all data from all of my tables for user testing purposes. I'd like to essentially bypass the mapping restriction and just issue a plain SQL delete statement.
I thought this would be easy peasy, but maybe Hibernate is right to make this either difficult or outright forbid it.
I can't find anything in the documentation that will execute a plain delete statement without any regard to the mapping or types. Am I right in thinking that I must use a stored procedure here?
|