![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hibernate学习
iteye_5625
这个作者很懒,什么都没留下…
展开
-
hibernate.hbm2ddl.auto的值区别
[size=x-large]hibernate.hbm2ddl.auto的值的区别[/size] create:表示启动的时候先drop,再create create-drop: 也表示创建,只不过再系统关闭前执行一下drop update: 这个操作启动的时候会去检查schema是否一致,如果不一致会做scheme更新 validate: 启动时验证现有schema与...原创 2012-07-18 10:02:52 · 66 阅读 · 0 评论 -
openSession() 与 getCurrentSession () 的区别
[size=large]openSession() 与 getCurrentSession () 的区别[/size] 区别一: openSession() 获取session需要在最后手动关闭session getCurrentSession ()是自动关闭session,这种方法必须在hibernate.cfg.xml文件中配置自动session管理(current_sessio...原创 2012-07-18 11:17:18 · 64 阅读 · 0 评论