Hibernate version: 3.1
On a normal connection to the database
Code:
sessionFactory = CFG.buildSessionFactory();
.
.
.
session = sessionFactory.openSession(new AuditInterceptor());
i would like to run some DB configuration/check scripts (to ensure records that are meant to be there, are there).
I have done some ropey function that to runs a load of sql update statements via the connection, but is there a easier way ?
Maybe something i can put into the config/mapping files.
The idea is that there should be a couple of records in a table, as part of normal operations.