Is there a way to run an external sql script using the SessionFactory ? I know there is a way to specify raw sql but is there a way to run a .sql file ?
I have tried to do session.createSQLQuery("BEGIN"+content+ "END").executeUpdate(); but no success but using entity manager you can achieve same thing please visit this stackoverflow.com/questions/14358425/…
I wanted to do this a a part of my test suite. I have a testNG suite from which I want to run my application against multiple test data sets. I am using HSQL embeddeddatabase and would have to run a new file in the BeforeSuite.
session.createSQLQuery("BEGIN"+content+ "END").executeUpdate();but no success but using entity manager you can achieve same thing please visit this stackoverflow.com/questions/14358425/…