
hibernate
hello_realWorld
不忘初心
展开
-
org.hibernate.TransientObjectException: The given object has a null identifier:
错误解释:瞬时对象异常:给的对象没有id值,hibernate更新失败 原因:修改页面的表单没有通过隐藏域保留id的值 解决方案:在表单中添加一个隐藏域,保存id值转载 2016-10-10 19:55:31 · 367 阅读 · 0 评论 -
hibernate工作原理
hibernate工作原理: 1.通过Configuration config = new Configuration().configure();//读取并解析hibernate.cfg.xml配置文件 2.由hibernate.cfg.xml中的读取并解析映射信息 3.通过SessionFactory sf = config.buildSessionFactory();//创建Sessi转载 2016-09-25 18:04:25 · 267 阅读 · 0 评论