-->
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.  [ 3 posts ] 
Author Message
 Post subject: hbm2ddl and update="true" problems
PostPosted: Thu Sep 25, 2008 10:52 am 
Newbie

Joined: Thu May 15, 2008 10:04 am
Posts: 7
Location: uk
Hibernate tools:
3.2.3.ga

Name and version of the database you are using:
Oracle 9i

ant task:
<target name="GenDDL" depends="init" description="Generates ddl file">
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpath="${compile_classpath}" />
<hibernatetool destdir="${src.dir}">
<configuration configurationfile="${resources.dir}/hibernate.cfg.xml" />
<hbm2ddl export="false" update="true" drop="false" outputfilename="dboutput.ddl" format="true" haltonerror="true" />
</hibernatetool>
</target>


Im trying to get a script that details updates made to the database, but no file gets generated. The log output lists all the alter table statements etc and then this:

25-Sep-2008 14:31:23 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: schema update complete

suggesting it's completed successfully, but neither the database is updated nor a file created. If I don't have update="true" in my ant task then it writes out the create/alter scripts to a file successfully.

I have read a number of posts where other people are having the same problem, but haven't come across a solution yet. Is this an outstanding bug?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 25, 2008 5:56 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes it is a known issue. Fixed in latest Hibernate core release.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 30, 2008 8:47 am 
Newbie

Joined: Thu May 15, 2008 10:04 am
Posts: 7
Location: uk
Hi Max

I've upgraded to Hibernate Core 3.3.1.GA but still have the same problem. I get all the alter statements written out followed by these lines, but no file is created...

INFO : org.hibernate.tool.hbm2ddl.SchemaUpdate - schema update complete
INFO : org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool:


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.