[英]Why my Tables get cleared when i use hibernate?
我已经使用了hibernate和oracle来创建了一些项目...我在其中有许多映射..在映射后,当我执行程序时它可以正常工作,但是当我重新执行程序时,我的表就被清除了...任何想法y ?
somewhere in your config you have a property called hibernate.hbm2ddl.auto
set to the value create
or create-drop
. 在配置中的某处,您有一个名为hibernate.hbm2ddl.auto
的属性,其值设置为create
或create-drop
。 Just delete that property or assign the value do_nothing
. 只需删除该属性或分配值do_nothing
。
If you set that property to an invalid value (such as do_nothing
), hibernate doesn't do anything. 如果将该属性设置为无效值(例如do_nothing
),则休眠不会执行任何操作。
You can check the documentation of that property here . 您可以在此处查看该属性的文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.