-->
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: difference between create and create-drop, validate and up
PostPosted: Fri May 09, 2008 5:36 am 
Newbie

Joined: Wed May 07, 2008 10:23 am
Posts: 9
Location: Santharavur,Chirala,AP,India
Hi

1.create : Every time it is creating new table...with new records.

2. create-drop : This is looks like create...but i m not getting exact difference.

3.Validate : It will append the records in the same table.

4.update : looks like validate...but i m not getting exact difference.


diffirence between create and create-drop
and validate and update methods.

Please help me in this.
Thanks in advance
Purna

Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html

_________________
B.PurnachandraRao
Santharavur,Chirala,AP,India


Top
 Profile  
 
 Post subject: the differences
PostPosted: Sun May 11, 2008 8:39 am 
Senior
Senior

Joined: Sun Jun 11, 2006 10:41 am
Posts: 164
create: try to create the schema (DDL) when the session factory is started. When running with JPA, it happens when the EJB module is being deployed.
create-drop: like 'create', but also try to destroy the schema when the factory is destroyed (with JPA - when the EJB module is undeployed)
validate: just ensure the schema is as expected based on the mapping files
update: try to make incremental changes to the existing schema if it does not match the expected schema.
http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#toolsetguide


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.