![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Hibernate
文章平均质量分 81
bj_dxd
这个作者很懒,什么都没留下…
展开
-
数据库属性hibernate.dialect的设置
为数据库属性hibernate.dialect设置正确的 org.hibernate.dialect.Dialect子类. 如果指定一种方言, Hibernate将为上面列出的一些属性使用合理的默认值, 为你省去了手工指定它们的功夫. 表 4.8. Hibernate SQL方言 (hibernate.dialect) RDBMS 方言 DB2 org....原创 2012-05-04 14:30:39 · 194 阅读 · 0 评论 -
mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations
由于spring对hibernate配置文件hibernate.cfg.xml的集成相当好 LocalSessionFactoryBean有好几个属性用来查找hibernate映射文件: mappingResources、mappingLocations、mappingDirectoryLocations、mappingJarLocations 他们的区别: 1. mappingResource...原创 2012-05-04 15:59:46 · 136 阅读 · 0 评论 -
Hibernate的四种数据加载方式
1、即时加载(Immediate Loading) 当实体加载完成后,立即加载与实体相关联的数据。即当实体加载完成后,Hibernate自动立即读取与实体相关联的数据,并且填充到实体对应的属性中。这种加载通常有多条select语句,即select实体数据后,同时select实体相关联的数据。 2、延迟加载(Lazy Loading) 实体加载时,其关联数据并不是立即读取,而是当关联数据...原创 2012-02-03 15:07:11 · 120 阅读 · 0 评论 -
Hibernate保存方式和三种状态的分析
Hibernate的状态 hibernate的各种保存方式的区(save,persist,update,saveOrUpdte,merge,flush,lock)及 对象的三种状态 hibernate的保存 hibernate对于对象的保存提供了太多的方法,他们之间有很多不同,这里细说一下,以便区别。 一、预备知识 在所有之前,说明一下,对于hibernate,...原创 2012-02-03 15:20:37 · 290 阅读 · 0 评论