1.15 程序控制自动根据xml生成新表
2015-12-12 16:26
281 查看
1.在hibernate.cfg.xml配置中,有
<property name="hbm2ddl.auto">update</property>这一句,就是在数据库中没有对应的表时,系统自动生成表格。
2.本节将利用程序进行控制hibernate生成新表。
new SchemaExport(new AnnotationConfiguration().configure()).creart(true,true);
<property name="hbm2ddl.auto">update</property>这一句,就是在数据库中没有对应的表时,系统自动生成表格。
2.本节将利用程序进行控制hibernate生成新表。
new SchemaExport(new AnnotationConfiguration().configure()).creart(true,true);
相关文章推荐
- Android界面之Activity
- scrapy爬虫框架的使用
- mysql 提示找不到.pid文件
- prime ring problem(hdu 1016)
- java.exe finished with non-zero exit value 1 问题引申
- 两行文字,固定宽高,超出部分以三点隐藏
- tomcat的高并发配置
- cache 是什么意思 它包括的L1,L2,L3分别是什么东西
- Android的消息处理机制源码分析
- div 纯数字很长时无法折行解决
- fork函数详解--20
- ios—跑马灯.开始暂停
- hdu 1575 Tr A(矩阵快速幂乘法优化算法)
- avalov+require实现tab栏
- innodb_kill_idle_transaction(kill长久未提交的事务)
- 数据结构之快速排序
- POJ-3096
- 关于尼康黄的原因
- 【html】【16】高级篇--毛玻璃效果[模糊]
- 字符串反转(C语言)