文章分类 -  Hibernate

对象关系映射框架
摘要:我们在开发的时候经常会遇到延迟加载问题,在实体映射时,多对一和多对多中,多的一样的属性默认是lazy="true"(即,默认是延迟加载), 如:<many-to-one name="parent" class="Department" column="parentId" lazy="true"/> 阅读全文
posted @ 2019-06-22 23:32 expworld 阅读(830) 评论(0) 推荐(0)
摘要:package com.exp.hibernate.utils; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class HibernateUtils { private static Session... 阅读全文
posted @ 2019-04-14 13:50 expworld 阅读(156) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-04-13 16:32 expworld 阅读(67) 评论(0) 推荐(0)
摘要:package com.gyf.hibernate.test; import java.util.List; import org.hibernate.Criteria; import org.hibernate.Hibernate; import org.hibernate.Query; import org.hibernate.SQLQuery; import org.hibernat... 阅读全文
posted @ 2019-04-13 15:50 expworld 阅读(617) 评论(0) 推荐(0)
摘要:package com.gyf.hibernate.test; import java.util.List; import org.hibernate.Criteria; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibe... 阅读全文
posted @ 2019-04-13 15:28 expworld 阅读(202) 评论(0) 推荐(0)
摘要:package com.gyf.hibernate.test; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.h... 阅读全文
posted @ 2019-04-13 15:26 expworld 阅读(88) 评论(0) 推荐(0)
摘要:package com.gyf.hibernate.test; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; import org.junit.Test; ... 阅读全文
posted @ 2019-04-13 14:36 expworld 阅读(602) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-04-11 23:05 expworld 阅读(90) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-04-11 23:04 expworld 阅读(89) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-04-11 00:57 expworld 阅读(86) 评论(0) 推荐(0)
摘要:User.hbm.xml User.java 阅读全文
posted @ 2019-04-11 00:41 expworld 阅读(157) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-04-11 00:39 expworld 阅读(438) 评论(0) 推荐(0)
摘要:com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/hibernate_day01 root 123455 true true ... 阅读全文
posted @ 2019-04-11 00:37 expworld 阅读(1013) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-04-08 22:21 expworld 阅读(84) 评论(0) 推荐(0)