I'm trying to iterate over all of my tables so I can truncate each one (at the beginning of each of my JBehave tests).
I thought I would be able to:
List<String> allTables = session.createSQLQuery("SHOW TABLES").list();
But hibernate throws a SQLGrammarException, complaining that "Column 'TABLE_NAME' not found."
I guess this is because the "show tables" query doesn't actually return a list of strings. Is there another way to get a list of all my tables using Hibernate?