Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to stop schema export on exception?
PostPosted: Tue Apr 05, 2005 5:17 am 
Beginner
Beginner

Joined: Mon Dec 15, 2003 5:25 am
Posts: 48
Location: Delhi, India
Hi All,

I am exporting schema programmatically like below-
Code:
      SchemaExport schExp = new SchemaExport(config);
      schExp.setDelimiter(";");
      schExp.create(true, true);


The schema export continues even if there is a failure in table creation. How can I stop the schema export incase there is failure?

Thanks,

_________________
Vinod K. Singh


Top
 Profile  
 
 Post subject: DEBUG org.hibernate.tool.hbm2ddl.SchemaExport - drop table
PostPosted: Thu Aug 09, 2012 2:51 am 
Newbie

Joined: Wed Jul 25, 2012 7:48 am
Posts: 1
hi..

when i running an application ..the hibernate schemaexport tool is deleting my old tables and it is creating new tables.
like

8782 [http-8080-1] DEBUG org.hibernate.tool.hbm2ddl.SchemaExport - drop table if exists Campsite_info

and it is creating like..


8985 [http-8080-1] DEBUG org.hibernate.tool.hbm2ddl.SchemaExport - create table Campsite_info (USER_ID integer not null, USER_NAME varchar(255), USER_ADDRESS varchar(255), USER_PIN integer, USER_PHNO integer, USER_TALUKA varchar(255), USER_DISTRICT varchar(255), USER_OCCASION varchar(255), SITE_ADDRESS varchar(255), EXPECTED_DONORS integer, USER_MOBILE integer, VISIT_DATE datetime, CAMP_DATE datetime, INCHARGE_NAME varchar(255), primary key (USER_ID))



i dont know why.
iam searching for the solution for a week.
please help me..


Top
 Profile  
 
 Post subject: Re: How to stop schema export on exception?
PostPosted: Thu Aug 09, 2012 4:14 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2296
Location: Third rock from the Sun
Hi,
you must have a configuration setting defined for the property
Code:
hibernate.hbm2ddl.auto=


See the valid options at http://docs.jboss.org/hibernate/core/4.1/manual/en-US/html_single/#configuration-misc-properties

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 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.