I have a table in an Oracle database.
I want to know how to delete its rows, or how to delete purely the table using Hibernate, but not by changing the corresponding mapped class. I mean, I want to do it ouside the mapped class, in a main Java method for example.
To read data, I always use native SQL queries with Hibernate.
To write data, I use session.save
But how do I do to delete data from a table, or delete the table ?
I looked at the Hibernate documentation, but the solution always involves changing the mapped class code by adding annotations...
I want a solution like the one I use to read and write data :
session.createSQLQuery("...");
Or
session.save(...);
Is there a solution like that ?