Hibernate hbm2ddl.auto, possible values, and what they do

For hbm2ddl.auto property the list of possible options is:

  • validate: validate that the schema matches, make no changes to the schema of the database, you probably want this for production.
  • update: update the schema to reflect the entities being persisted
  • create: creates the schema necessary for your entities, destroying any previous data.
  • create-drop: create the schema as in create above, but also drop the schema at the end of the session. This is great in early development or for testing.

Leave a Comment