-->
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: How to extend hbm2ddl
PostPosted: Sat Sep 10, 2005 11:38 am 
Beginner
Beginner

Joined: Tue Nov 30, 2004 6:19 am
Posts: 29
Location: Germany
Hi all,

is it possible to add createstatements to the automatic hbm2ddl run on startup time?

We are touching our model every day and therefor we use the hbm2ddl very often in the create-drop mode. Now we are thinking about adding eg. additional sequences (for business keys). Can I add these additional create scripts to the hbm2ddl?

Kind regards,
Michael


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 10, 2005 6:03 pm 
Beginner
Beginner

Joined: Tue Aug 16, 2005 11:06 pm
Posts: 46
I doubt you can do that, but you can achieve it by invoking an Ant task after schema export is done, just like populating a database using sql task after the db is created. e.g
Code:
<target name="create_additional_seqence">
     <sql driver="org....."
            url="jdbc...."
       userid="..."
        password=".."
            src="yourscripts.sql">
         <classpath refid="your_classpath"/>
   </sql>
</target>


Hope this helps.[/code]

_________________
Jason Li
Don't forget to rate:)


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.