This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes hibernate.hbm2ddl.auto value to do both the operations i.e create/update on database schema? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "hibernate.hbm2ddl.auto value to do both the operations i.e create/update on database schema?" Watch "hibernate.hbm2ddl.auto value to do both the operations i.e create/update on database schema?" New topic
Author

hibernate.hbm2ddl.auto value to do both the operations i.e create/update on database schema?

scott miles
Ranch Hand

Joined: Jun 16, 2011
Posts: 70
i want to know for now, Is it possible in hibernate to create database schema if schema does not exist otherwise update the schema if it is already exist and there are some modification in hbm file with some value for property hibernate.hbm2ddl.auto .

As per my understanding create value will always drop the previous schema and create the new schema ? update value will not create new schema, it will just update the schem if exist a based on hbm.xml. Right?

Mine scheme is local schema not a production schema.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: hibernate.hbm2ddl.auto value to do both the operations i.e create/update on database schema?
 
Similar Threads
Data Not inserting into Database JPA+Hibernate
Create database schema from Hibernate?
'hbm2ddl.auto' option in hibernate
database schema definition outside of hbm files?
How to keep Hibernate from exporting a schema if one already exists?