文章分类 -  Hibernate

对象关系映射框架
摘要:我们在开发的时候经常会遇到延迟加载问题,在实体映射时,多对一和多对多中,多的一样的属性默认是lazy="true"(即,默认是延迟加载), 如:<many-to-one name="parent" class="Department" column="parentId" lazy="true"/> 阅读全文
posted @ 2019-06-22 23:32 expworld 阅读(804) 评论(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 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-04-13 16:32 expworld 阅读(63) 评论(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 阅读(607) 评论(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 阅读(164) 评论(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 阅读(78) 评论(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 阅读(522) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-04-11 23:05 expworld 阅读(66) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-04-11 23:04 expworld 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-04-11 00:57 expworld 阅读(76) 评论(0) 推荐(0) 编辑
摘要:User.hbm.xml User.java 阅读全文
posted @ 2019-04-11 00:41 expworld 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-04-11 00:39 expworld 阅读(426) 评论(0) 推荐(0) 编辑
摘要:com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/hibernate_day01 root 123455 true true ... 阅读全文
posted @ 2019-04-11 00:37 expworld 阅读(987) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-04-08 22:21 expworld 阅读(78) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示