根据这个答案,我们可以将 create 分配给 hbm2dll.auto 以删除所有表并重新创建它们,但是当我将 create 分配给它并运行应用程序时,它不会更改某些表并在控制台中显示不同的错误,如下。我想知道为什么它无法删除并重新创建所有表。
....
ERROR: Table 'mydb.user' doesn't exist
....
ERROR: Table 'animal' already exists
....
Can't create table 'mydb.#sql-43c_6b' (errno: 150)
....
休眠.cfg.xml
<property name="hbm2ddl.auto">create</property>