发布时间:2014-04-19 23:53:46
配置映射:1.courseinfo类:package com.xiyou.dao.po;import java.io.Serializable;import java.util.HashSet;import java.util.Set;import javax.persistence.CascadeType;import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.FetchType;import javax.persistence.........【阅读全文】
发布时间:2014-04-19 23:44:39
Hibernate:More than one row with the given identifier was found解决办法今天写一个Action 通过 HQL 查询一个表 出现异常 “More than one row with the given identifier was found”问题原因: 数据库出现数据异常 存在多条主键不唯一的数据 (看来ORACLE也会出BUG呀)问题解.........【阅读全文】
发布时间:2014-04-15 16:26:58
Hibernate、Hibernate4获取SessionFactory对象方法的变化Hibernate用来获取配置文件的类是Configuration,若用Annotation的话就是AnnotationConfiguration类。例:Configuration config = new Configuration();config.configure("hibernate.cfg.xml");//用configure()方法取得。//或.........【阅读全文】
发布时间:2014-04-14 23:39:37
01.java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z 02. at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1837) 03. at org.hibernate.cfg.AnnotationBinder.processIdPropertie.........【阅读全文】