These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Running Custom SQL Script on DB Connection.
PostPosted: Mon Sep 25, 2006 10:29 am 
Beginner
Beginner

Joined: Wed Sep 13, 2006 7:24 am
Posts: 26
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.

_________________
Ben


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.