hibernate.hbm2ddl.auto=update
来源:互联网 发布:软件代理商名录 编辑:程序博客网 时间:2024/06/09 18:09
hibernate.cfg.xml配置如下<hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property> <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:zy</property> <property name="hibernate.connection.username">tom</property> <property name="hibernate.connection.password">aaaaaa</property> <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property> <property name="hibernate.show_sql">true</property> <property name="hibernate.hbm2ddl.auto">update</property> <mapping resource="net/huadong/exammis/pojo/Person.hbm.xml"/> </session-factory></hibernate-configuration>
update只是更新表结构,但不能生成请仔细参考一下hibernate.hbm2ddl.auto的配置参数,有以下四种:validate:加载hibernate时,验证创建数据库表结构create:每次加载hibernate,重新创建数据库表结构,这就是导致数据库表数据丢失的原因。create-drop:加载hibernate时创建,退出是删除表结构update:加载hibernate自动更新数据库结构
0 0
- hibernate.hbm2ddl.auto=update
- <property name="hibernate.hbm2ddl.auto">update</property>
- Hibernate的hbm2ddl.auto=update的内幕
- hibernate.hbm2ddl.auto=validate
- could not get next sequence value hibernate.hbm2ddl.auto=update hibernate.default_schema
- hibernate.hbm2ddl.auto=update 更改实体类后,数据库不更新
- hibernate.hbm2ddl.auto设置成update的问题
- hibernate.hbm2ddl.auto为update无法自动建表
- hibernate.hbm2ddl.auto
- 姚博文 hibernate.hbm2ddl.auto
- hibernate.hbm2ddl.auto
- hibernate.hbm2ddl.auto
- hibernate.hbm2ddl.auto配置
- hibernate.hbm2ddl.auto
- hibernate.hbm2ddl.auto
- hibernate.hbm2ddl.auto
- hibernate.hbm2ddl.auto
- hibernate.hbm2ddl.auto配置
- iOS摄像头和相册-UIImagePickerController
- CSS中position的妙用
- java编程思想易错点三
- Intent传递非基本类型的值
- # Android中Activity四种启动模式和taskAffinity属性详解 #(5)原创分享
- hibernate.hbm2ddl.auto=update
- 关于Unity与Xcode之间的交互问题
- getBytes()
- libuv多线程处理的简单示例
- iOS开发网络篇—文件下载(二·合理)
- 好记性不如烂笔头41-javaWeb应用中ServletRequest域的监听(5)
- LaTeX,eps图片Bounding Box入门介绍
- 清除eclipse中 Launch configuration的历史记录
- Android四大基本组件介绍与生命周期