-->
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.  [ 4 posts ] 
Author Message
 Post subject: "hbm2ddl.auto" possible values
PostPosted: Mon Jan 12, 2009 11:02 am 
Newbie

Joined: Tue Dec 23, 2008 9:30 am
Posts: 14
<property name="hbm2ddl.auto"> ??</property>

can any one tell me what are the possible values of "hbm2ddl.auto" and what does every value do? especially "update"
I noticed that it creates the new tables but doesn't make modifications to the attributes


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 12, 2009 12:11 pm 
Newbie

Joined: Mon Mar 10, 2008 11:55 am
Posts: 8
validate | update | create | create-drop


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 13, 2009 2:06 am 
Newbie

Joined: Tue Dec 23, 2008 9:30 am
Posts: 14
what about export ??
and what does validate do ???


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 13, 2009 3:29 am 
Beginner
Beginner

Joined: Wed Nov 19, 2008 8:25 am
Posts: 46
Location: Saint Petersburg, Russian Federation
h3a wrote:
what about export ??
and what does validate do ???


There is no such option as 'export' - 3.4. Optional configuration properties -> Table 3.7. Miscellaneous Properties:

Quote:
hibernate.hbm2ddl.auto

Automatically validate or export schema DDL to the database when the SessionFactory is created. With create-drop, the database schema will be dropped when the SessionFactory is closed explicitly.

eg. validate | update | create | create-drop



About 'validate' option:

Quote:
Another hbm2ddl.auto setting useful in development is validate. It enables
SchemaValidator to run at startup. This tool can compare your mapping against the JDBC metadata and tell you if the schema and mappings match. You can also run SchemaValidator programmatically:

Code:
Configuration cfg = new Configuration().configure();
new SchemaValidator(cfg).validate();


An exception is thrown if a mismatch between the mappings and the database
schema is detected.


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