
hibernate
caixiexin
这个作者很懒,什么都没留下…
展开
-
hibernate.cfg.xml模板
该文件必须放在源码src文件夹目录上 "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">org.hibernate.d原创 2011-11-25 10:34:25 · 1386 阅读 · 0 评论 -
hibernateTools工具安装及使用总结(eclipse 3.6)
转自:http://blueblood79.iteye.com/blog/773177 最近项目采用flex+spring+hibernate的框架开发,之前虽说有多年的Java开发经验了,但是一直使用的JDBC或者ibatis,hibernate的使用还是大姑娘上轿头一回,网上都介绍说jboss的hibernateTools工具不错,所以安装使用了一下,下面是安装使用的总转载 2011-11-28 10:54:56 · 8339 阅读 · 1 评论 -
使用Hibernate操作数据库时报:No CurrentSessionContext configured! 异常
org.hibernate.HibernateException: No CurrentSessionContext configured!没有currentSession配置错误,即在我们使用currentSession的时候要在hibernate.cfg.xml中进行相关的事务配置:1、本地事务thread2、全局事务jta这样就解决了!如果在获转载 2011-11-28 16:42:59 · 10696 阅读 · 0 评论 -
hibernate基础 类与接口介绍
转自 V512 hibernate 视频转载 2011-11-28 10:24:09 · 693 阅读 · 0 评论 -
Eclipse 用Hibernate Tools 生成 .hbm cfg.xml等文件
http://www.cnblogs.com/abllyboy/archive/2010/12/23/1914577.html建立好数据库后,点击一个键,代码就生成了,这实在是份十分惬意的事情,前面有介绍Hibernate Tools就可以生成代码,那么我们怎么利用它来生成代码呢。下面就把详细步骤贴出来,同样,有图有真相。Step1:安装好Hibernate转载 2011-11-28 13:48:06 · 27161 阅读 · 1 评论 -
Could not parse configuration: /hibernate.cfg.xml 异常
在使用hibernate时,报了 Could not parse configuration: /hibernate.cfg.xml这很有可能是hibernate.cfg.xml文件出错此时可以先用浏览器打开 hibernate.cfg.xml文件 看看能不能正常显示,如果不能,则说明配置文件编写有问题(比如DTD的url错误,标签错误等),改正相应的错误后就不报异常了原创 2011-11-29 19:37:20 · 12293 阅读 · 1 评论 -
hibernate 持久化对象生命周期
转载 2011-11-30 08:43:09 · 1209 阅读 · 0 评论 -
hibernate的 open session in view
http://fuliang.iteye.com/blog/146965我们在使用Hibernate的lazy load来优化性能的时候,只要Session关闭后再试图访问未被载入的对象时,就会出现异常。通常使用在事务之内来访问数据是适合的,但是有时候我们需要强制载入这些数据,例如在Web视图中访问这些模型对象。 在业务层强制载入这些数据,通常不是很好的解决方案,因为不同转载 2011-11-30 09:18:53 · 3709 阅读 · 0 评论