0

In hibernate config file, hibernate.hbm2ddl.auto should be set to what value?

What is the case where we give as Validate? and What if we do not even specify it in config file? Can someone please throw some light on this?

Sripaul
  • 2,227
  • 9
  • 36
  • 60
  • possible duplicate of [Hibernate question hbm2ddl.auto possible values and what they do](http://stackoverflow.com/questions/438146/hibernate-question-hbm2ddl-auto-possible-values-and-what-they-do) – Harry Joy Apr 28 '11 at 11:09
  • I set it as **DO_NOTHING** to be explicit (hibernate doesn't fail if the value is *invalid*). Validate is ok, but I don't use it because Hibernate goes in a infinite loop validating the entities with my configuration :S. – Augusto Apr 28 '11 at 11:13

1 Answers1

2

In production, you shouldn't allow Hibernate to alter your database structure, IMO. You shouldn't bother setting hbm2ddl.auto at all.

Joseph Ottinger
  • 4,911
  • 1
  • 22
  • 23