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
|