随笔分类 -  Hibernate

1
摘要:https://pan.baidu.com/s/1eRIDTJ0 阅读全文
posted @ 2017-11-07 16:58 GordonDicaprio 阅读(646) 评论(0) 推荐(0) 编辑
摘要:项目部署,启动过程中有以下警告: [WARN]: Using org.hibernate.id.UUIDHexGenerator which does not generate IETF RFC 4122 compliant UUID values; consider using org.hiber 阅读全文
posted @ 2017-11-07 16:31 GordonDicaprio 阅读(1725) 评论(0) 推荐(0) 编辑
摘要:package com.gordon.test; import java.util.List; import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.Transaction; import org.hibernate.criterion.DetachedCriteria; impor... 阅读全文
posted @ 2017-08-24 15:03 GordonDicaprio 阅读(419) 评论(0) 推荐(0) 编辑
摘要:01.环境搭建 02.基本查询 1.方法说明 方法 说明 Restrictions.eq = Restrictions.allEq 利用Map来进行多个等于的限制 Restrictions.gt > Restrictions.ge >= Restrictions.lt < Restrictions. 阅读全文
posted @ 2017-08-24 14:37 GordonDicaprio 阅读(419) 评论(0) 推荐(0) 编辑
摘要:QBC查询方式 01.基本查询 02.组合查询 03.关联查询 04.分页查询 05.QBE查询 06.离线查询 阅读全文
posted @ 2017-08-24 14:33 GordonDicaprio 阅读(262) 评论(0) 推荐(0) 编辑
摘要:01.搭建开发环境 02.子查询 阅读全文
posted @ 2017-08-24 09:50 GordonDicaprio 阅读(216) 评论(0) 推荐(0) 编辑
摘要:01.搭建开发环境 02.连接查询 阅读全文
posted @ 2017-08-24 09:43 GordonDicaprio 阅读(328) 评论(0) 推荐(0) 编辑
摘要:01.搭建开发环境 02.条件查询 阅读全文
posted @ 2017-08-24 09:22 GordonDicaprio 阅读(303) 评论(0) 推荐(0) 编辑
摘要:01.搭建环境 02.分页查询 阅读全文
posted @ 2017-08-24 09:17 GordonDicaprio 阅读(254) 评论(0) 推荐(0) 编辑
摘要:什么是动态实例查询: 就是将查询出的单一列的字段,重新封装成对象,如果不适用特殊方法,会返回Object对象数组。 01.搭建环境 02.动态实例查询 需要使用相应的构造方法: 阅读全文
posted @ 2017-08-23 15:34 GordonDicaprio 阅读(363) 评论(0) 推荐(0) 编辑
摘要:01.搭建开发环境 02.基本查询 阅读全文
posted @ 2017-08-23 14:58 GordonDicaprio 阅读(262) 评论(0) 推荐(0) 编辑
摘要:数据库:两张表,两者通过publisher_id构成关联关系。 Book(图书表) Publisher(出版社表) 数据: 项目结构以及所使用的包: 实体类,以及映射文件: Book.java Book.hbm.xml: Publisher.java Publisher.hbm.xml: hiber 阅读全文
posted @ 2017-08-23 14:21 GordonDicaprio 阅读(250) 评论(0) 推荐(0) 编辑
摘要:HQL查询方式 01.基本查询 02.动态实例查询 03.分页查询 04.条件查询 05.连接查询 06.子查询 阅读全文
posted @ 2017-08-23 14:15 GordonDicaprio 阅读(184) 评论(0) 推荐(0) 编辑
摘要:01.HQL查询方式 02.QBC查询方式 02.原始SQL查询方式 阅读全文
posted @ 2017-08-23 14:13 GordonDicaprio 阅读(151) 评论(0) 推荐(0) 编辑
摘要:实体类: Student.java: Course.java: hbm映射文件: Student.hbm.xml: Course.hbm.xml: 核心配置文件: 测试类: 阅读全文
posted @ 2017-08-22 21:19 GordonDicaprio 阅读(202) 评论(0) 推荐(0) 编辑
摘要:配置: 阅读全文
posted @ 2017-08-22 14:25 GordonDicaprio 阅读(258) 评论(0) 推荐(0) 编辑
摘要:@Test public void testHql() { Configuration configuration = new Configuration().configure(); SessionFactory sessionFactory = configuration.buildSessionFactory(); Session session = sessionFactory.o... 阅读全文
posted @ 2017-08-21 20:31 GordonDicaprio 阅读(245) 评论(0) 推荐(0) 编辑
摘要:原文地址:http://www.iteye.com/topic/18904 很多人对二级缓存都不太了解,或者是有错误的认识,我一直想写一篇文章介绍一下hibernate的二级缓存的,今天终于忍不住了。 我的经验主要来自hibernate2.1版本,基本原理和3.0、3.1是一样的,请原谅我的顽固不化 阅读全文
posted @ 2017-08-20 14:16 GordonDicaprio 阅读(240) 评论(0) 推荐(0) 编辑
摘要:项目结构: 数据库: 所使用的jar包: 1、导入hibernate核心必须包(\lib\required) 2、导入mysql驱动包 3、导入log4j日志包 项目代码: com.gordon.domain: --Customer.java --Customer.hbm.xml *Hibernat 阅读全文
posted @ 2017-08-19 00:45 GordonDicaprio 阅读(356) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/jiuqiyuliang/article/category/4442027 阅读全文
posted @ 2017-08-18 17:00 GordonDicaprio 阅读(380) 评论(0) 推荐(0) 编辑

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