如何关闭hbm2ddl? [英] How to turn off hbm2ddl?

查看:166
本文介绍了如何关闭hbm2ddl?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法找到关于如何关闭hbm2ddl的参考。 只要省略 hibernate.hbm2ddl.auto 默认为Hibernate不做任何事情。从参考文件:


1.1.4。 Hibernate配置



hbm2ddl.auto 选项打开
自动生成数据库
模式直接进入数据库。
也可以通过移除配置选项
或使用SchemaExport Ant任务的帮助
重定向到文件来关闭此功能。


hbm2ddl.auto 设置为 none (未记录)可能会生成警告,例如: org.hibernate.cfg.SettingsFactory - hibernate.hbm2ddl.auto无法识别的值:无


I couldn't find a reference on how to switch hbm2ddl off.

解决方案

Just omitting hibernate.hbm2ddl.auto defaults to Hibernate not doing anything. From the reference documentation:

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.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆