1、Query查询方式 SQL,HQL,OID,QBC(query by criteria)2、二级缓存 sessionFactory缓存,也叫进程级的缓存,使用第3方插件实现的,只缓存实体,生命周期和sessionFactory一致 使用环境: 经常被访问 改动不大... Read More
posted @ 2014-05-26 21:25 gowork Views(287) Comments(0) Diggs(0) Edit
1、many-to-one 关联映射2、one-to-many 关联映射 概述:取出one一方的时候也要取出many一方 基础: t_order(t_id,...) t_item(t_id,...,t_order_id) 需求: 操作Order的时候一般要操... Read More
posted @ 2014-05-26 21:22 gowork Views(242) Comments(0) Diggs(0) Edit
1、工作原理-ORM 读取并解析hibernate.cfg.xml配置文件 由hibernate.cfg.xml中的读取并解析映射信息 创建SessionFactory 打开Sesssion 创建事务Transation 持久化操作 提交事务 关闭Session ... Read More
posted @ 2014-05-26 14:59 gowork Views(304) Comments(0) Diggs(0) Edit
目录----------------------------------------------------一、Hibernate基础1、工作原理-ORM2、增删改查3、主键生成方式4、映射类型5、三种状态6、一级缓存7、延迟加载-----------------------------------... Read More
posted @ 2014-05-26 13:45 gowork Views(118) Comments(0) Diggs(0) Edit