-->
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.  [ 2 posts ] 
Author Message
 Post subject: Creating and Deleting DBs
PostPosted: Mon Nov 17, 2008 7:14 am 
Newbie

Joined: Mon Nov 17, 2008 6:56 am
Posts: 1
I need to write Java code for a CommonUtils class that will have methods like ResetDB() , CreateDB() and DeleteDB().
The hbm.xml files (that specify the properties/columns of all the classes/tables of the DB- say, TestDB) are available in the Folder "Resources".
How do I load/delete the DB by calling java methods?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 19, 2008 5:44 am 
Newbie

Joined: Wed Nov 19, 2008 3:13 am
Posts: 4
Hi,
Can u clarify this?
We can create, update, and delete tables of a specific DB
Are we able to create DB?

Is it possible to specify like "drop database if exists db_name" in hibernate.cfg.xml

Some thing like

<property name="hbm2ddl.auto">create</property>
<property name="hbm2ddl.auto">create-if-not-exists</property>
<property name="hbm2ddl.auto">update</property>
<property name="hbm2ddl.auto">validate</property>

Bear me if it’s a silly post

I am very new to this hibernate so couldn’t make out.

-------------
vino


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

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.