-1

According to this answer we can assign create to hbm2dll.auto in order to drop all the tables and re-create them but when I assign create to it, and run the application it does not alter some of the tables and shows different Errors in console, as following. I am wondering why it is unable to drop and re-create all the tables.

....
ERROR: Table 'mydb.user' doesn't exist
....
ERROR: Table 'animal' already exists
....
Can't create table 'mydb.#sql-43c_6b' (errno: 150)
....

hibernate.cfg.xml

<property name="hbm2ddl.auto">create</property>
Community
  • 1
  • 1

1 Answers1

0

Try this.

<property name="hibernate.hbm2ddl.auto">create</property>
Nitesh Mishra
  • 311
  • 1
  • 10