-->
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: How to ensure Hibernate will not update database schema?
PostPosted: Tue Sep 09, 2008 5:18 pm 
Newbie

Joined: Thu Aug 21, 2008 7:54 pm
Posts: 12
Hibernate version:
3.2.2.GA

Name and version of the database you are using:
MySQL 5.1.26-rc

We're planning on using Hibernate / JPA in a project in which we'll have legacy code hitting the same database at the same time. We'd like to be sure that Hibernate will not modify our database schema in any way (since it would likely break our legacy code).

I see the "hibernate.hbm2ddl.auto" property and that it can be set to validate | update | create | create-drop.

Question #1: Is it safe to assume that if we set hibernate.hbm2ddl.auto property to "validate" or do not specify it at all, that our database schema will not be updated?

Question #2: Aside from dirty data in any caching scheme we use, are there any other roadblocks that people have encountered while hitting the same database via Hibernate and another entry point at the same time?

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 10, 2008 1:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
#1 yes, hibernate does not alter any schema by default so just don't specify any hbm2ddl.auto setting

#2 non hibernate specific question - it is the case for any concurrent app accessing data ;)

_________________
Max
Don't forget to rate


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.