Rahul Tripathi
Rahul Tripathi

Reputation: 555

Can we use hibernate.hbm2ddl.auto=create and hibernate.hbm2ddl.auto=update both in hibernate.cfg.xml file

Can we use hibernate.hbm2ddl.auto=create and hibernate.hbm2ddl.auto=update both in hibernate.cfg.xml file?what happen if we use both create and update with each other.Please suggest i am confused.if i don't write any of them what will be default value.

Upvotes: 0

Views: 334

Answers (1)

kirti
kirti

Reputation: 4609

we cannot use hibernate.hbm2ddl.auto=create and hibernate.hbm2ddl.auto=update both in hibernate.cfg.xml file

create: creates the schema, destroying previous data. update: update the schema if it exists or create new schema if it doesnot exist.

Upvotes: 1

Related Questions