![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Annotation
文章平均质量分 74
u011057506
这个作者很懒,什么都没留下…
展开
-
联合主键
XML配置方法 1.新建一个用于存放联合主键的类. 2.配置映射文件 //新增存放联合主键的类.//需要实现序列化接口,覆盖hashCode和equals方法package com.meiyoudao.domain;import java.io.Serializable;/** * * @author meiyoudao * */public class Per转载 2013-10-06 10:40:21 · 912 阅读 · 0 评论 -
error:org.hibernate.LazyInitializationException: could not initialize proxy - no Session
error:org.hibernate.LazyInitializationException: could not initialize proxy - no Sessionload方法get方法相关代码:@Test public void testTeacherLoad() { Session session = sessionFactory.ge原创 2013-10-07 11:53:49 · 641 阅读 · 0 评论 -
org.hibernate.MappingException: Unknown entity常见问题(新手需注意)
import javax.persistence.Id;import javax.persistence.Table;import javax.persistence.Transient;import org.hibernate.annotations.Entity;//这是就出问题了哦@Entity@Table(name="test_person")public class Per转载 2013-10-09 10:45:43 · 721 阅读 · 0 评论 -
java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()Z
一个简单一对一联系 两个类 其中一个用了@OnetoOne 注解错误提示:Exception in thread "main" java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()Zat org.hibernate.cfg.AnnotationBinder.processElement转载 2013-10-09 07:09:51 · 528 阅读 · 0 评论