-->
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: can we turn off hibernate.hbm2ddl.auto?
PostPosted: Tue Nov 30, 2004 7:40 am 
Senior
Senior

Joined: Fri Jun 18, 2004 10:17 am
Posts: 140
Hi,

Each time we restart Tomcat we receive a lot of severe error warnings from Hibernate that it cannot create objects that already exist (which is fine, we don't want it to). I was wondering if there was any way we can stop Hibernate trying to create the tables and so fourth in our hibernate configuration file? Currently our hbm2ddl.auto is set at update .. is there another value to turn it off? Or will removing this property entirely do that?

Thanks!

Hibernate version:
2.1.4
Mapping documents:

<session-factory>

<property name="connection.datasource">java:comp/env/jdbc/iq</property>
<property name="dialect">net.sf.hibernate.dialect.SQLServerDialect</property>
<property name="show_sql">${hibernate.show_sql}</property>
<property name="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</property>

</session-factory>

Code between sessionFactory.openSession() and session.close():
M/A
Full stack trace of any exception that occurs:
N/A
Name and version of the database you are using:

The generated SQL (show_sql=true):
N/A
Debug level Hibernate log excerpt:
SEVERE: There is already an object named 'FKFD8C77F434D1D2B' in the database.
Nov 30, 2004 11:35:48 AM net.sf.hibernate.tool.hbm2ddl.SchemaUpdate execute
SEVERE: Unsuccessful: alter table dbPOF.dbo.tbl_Suppliers add constraint FKF33204C64FEEE146 foreign key (address_id) references dbPOF.dbo.tbl_IntlCompanyDetails
Nov 30, 2004 11:35:48 AM net.sf.hibernate.tool.hbm2ddl.SchemaUpdate execute
SEVERE: There is already an object named 'FKF33204C64FEEE146' in the database.
Nov 30, 2004 11:35:48 AM net.sf.hibernate.tool.hbm2ddl.SchemaUpdate execute
SEVERE: Unsuccessful: alter table dbIMS.dbo.tbl_Contacts add constraint FK72740BD483353C08 foreign key (entry_id) references dbIMS.dbo.tbl_Entries
Nov 30, 2004 11:35:48 AM net.sf.hibernate.tool.hbm2ddl.SchemaUpdate execute
SEVERE: There is already an object named 'FK72740BD483353C08' in the database.
Nov 30, 2004 11:35:48 AM net.sf.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: schema update complete


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 30, 2004 9:24 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Just remove the property


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.