我通过修改hibernate.cfg.xml中的以下属性解决了该错误
<property name="hibernate.hbm2ddl.auto">validate</property>
之前,每次我运行该程序时,该表都会被删除,但现在却没有,因为hibernate只验证架构,而不会影响对其的更改。

我通过修改hibernate.cfg.xml中的以下属性解决了该错误
<property name="hibernate.hbm2ddl.auto">validate</property>
之前,每次我运行该程序时,该表都会被删除,但现在却没有,因为hibernate只验证架构,而不会影响对其的更改。