如何关闭 hbm2ddl? [英] How to turn off hbm2ddl?
问题描述
我找不到有关如何关闭 hbm2ddl 的参考.
I couldn't find a reference on how to switch hbm2ddl off.
推荐答案
只是省略 hibernate.hbm2ddl.auto
默认为 Hibernate 不做任何事情.来自参考文档:
Just omitting hibernate.hbm2ddl.auto
defaults to Hibernate not doing anything. From the reference documentation:
hbm2ddl.auto
选项打开自动生成数据库模式直接导入数据库.这也可以通过删除配置选项来关闭,或在帮助下重定向到文件SchemaExport Ant 任务.
1.1.4. Hibernate configuration
The
hbm2ddl.auto
option turns on automatic generation of database schemas directly into the database. This can also be turned off by removing the configuration option, or redirected to a file with the help of the SchemaExport Ant task.
将 hbm2ddl.auto
设置为 none
(未记录)可能会生成警告,例如:org.hibernate.cfg.SettingsFactory - Unrecognized value for "hibernate.hbm2ddl.auto": 无
Setting hbm2ddl.auto
to none
(undocumented) might generate a warning, such as: org.hibernate.cfg.SettingsFactory - Unrecognized value for "hibernate.hbm2ddl.auto": none
这篇关于如何关闭 hbm2ddl?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!