摘要: package com.entity;public class User { private String username; private String password; private Integer id; public String getUsername() { return use... 阅读全文
posted @ 2014-10-13 19:41 马赛克都挡不住 阅读(160) 评论(0) 推荐(0) 编辑
摘要: package com;import org.hibernate.Session;import org.hibernate.SessionFactory;import org.hibernate.Transaction;import org.hibernate.cfg.Configuration;i... 阅读全文
posted @ 2014-10-13 19:22 马赛克都挡不住 阅读(574) 评论(0) 推荐(0) 编辑
摘要: package com.entity;import javax.persistence.Entity;import javax.persistence.OneToOne;@Entitypublic class Husband extends BaseEntity { @OneToOne(mapped... 阅读全文
posted @ 2014-10-13 19:20 马赛克都挡不住 阅读(126) 评论(0) 推荐(0) 编辑
摘要: package com.entity.onetomany;import java.util.ArrayList;import java.util.List;import javax.persistence.Entity;import javax.persistence.OneToMany;impor... 阅读全文
posted @ 2014-10-13 19:15 马赛克都挡不住 阅读(161) 评论(0) 推荐(0) 编辑
摘要: package com.entity.manytomany;import java.util.List;import javax.persistence.Entity;import javax.persistence.JoinColumn;import javax.persistence.JoinT... 阅读全文
posted @ 2014-10-13 19:10 马赛克都挡不住 阅读(313) 评论(0) 推荐(0) 编辑