Java ORM框架:Hibernate 4.1.8 版本发布
Hibernate ORM - 4.1.8 发布日志:
Bug修复情况
- [HHH-1283] - ScrollableResults JoinFetch don't set child collection correctly after the second parent object
- [HHH-1570] - criteria-api: filtering by key-many-to-one causes invalid sql
- [HHH-4459] - Query with Composite Primary Key parameter crashes when query cache is on
- [HHH-4635] - Oracle ORA-24816 inserting and updating data for entities containg LOB attributes
- [HHH-5209] - org.hibernate.hql.ast.QuerySyntaxException when running a JPQL query with a MEMBER OF on an @ElementCollection
- [HHH-5267] - NPE when updating a detached entity with a one-to-one association changed to null that is mapped with delete-orphan
- [HHH-5376] - Tests contain invalid SQL
- [HHH-5836] - Mapping collection of entities with same name and notnull constraints from two different entities results in duplicate property mapping of Backref
- [HHH-6043] - PostLoad method invoked before collection initialised
- [HHH-6349] - AuditJoinTable rows missing when detached entities with collections are merged into the persistence context
- [HHH-6655] - trim function on DB2 is broken
- [HHH-6972] - Support PostgreSQL and Oracle LOBs
- [HHH-7309] - Natural-id not cached in shared cache after insert
- [HHH-7359] - Trace logging causes numerous test errors
- [HHH-7487] - org.hibernate.type.EnumType incorrectly logs binded values
- [HHH-7541] - When using HSQLDB, inserting any CLOB value larger than 16Mb always fails with an exception
- [HHH-7569] - Correct test-only failures in hibernate-core-master-matrix CI job
- [HHH-7575] - Hibernate Getting Started Guide refers to incorrect tutorial directory for annotations tutoral
- [HHH-7577] - Dialect's supportsNotNullUnique not working when false
- [HHH-7578] - Sybase does not support "unique not null"
- [HHH-7579] - Oracle does not support "unique not null"
- [HHH-7584] - Sybase dialects attempting to use BLOB types
- [HHH-7586] - Re-architect Type or TypeFactory dynamic descriptors
- [HHH-7603] - NullPointerException being thrown instead of LazyInitializationException with collection reattach change
- [HHH-7640] - Enhancements to speed up and reduce mem consumption for Infinispan 2LC
- [HHH-7644] - Correct memory leak introduced by HHH-7557
- [HHH-7669] - JtaTransaction test fails on Oracle RAC
- [HHH-7674] - DB locks not cleared on LazyLoadingTest#testLazyCollectionLoadingWithClearedSession
- [HHH-7690] - Fix for @ManyToOne using @embeddedid with @ManyToOne inside
- [HHH-7692] - Postgres 9 and 9.1 use 8.1 dialect instead of 8.2 by default
- [HHH-7693] - SQL Server 2012 gets the SQL Server 2000 dialect by default
- [HHH-7711] - SchemaExport doesn't create file with script if both parameters exportToDatabase and scriptToConsole are false
- [HHH-7721] - SQLFunctionRegistry findSQLFunction does not honor case sensitivity
- [HHH-7724] - JpaLargeBlobTest failing on multiple DBs
- [HHH-7730] - SchemaExportManagedConnectionTest#testGenerateDdlToFile failing on Oracle & Sybase
- [HHH-7732] - QueryTest#testMemberOfSyntax failing on Oracle
- [HHH-7733] - NativeSQLQueriesTest failing on Postgres
- [HHH-7734] - SerializableTypeTest#testNewSerializableType failing for Oracle 11G R1
改进情况:
- [HHH-1775] - 集合批量获取(collection batch fetching)
- [HHH-6452] - PostgreSQL Dialect 没有完全实现NOWAIT锁
- [HHH-6682] - 为 Oracle Dialect添加 oracle "bitand" 函数支持
- [HHH-7631] - 改进UpdateTimestampsCache的性能
- [HHH-7633] - 改进IdentityMap的性能
- [HHH-7683] - 优化AbstractLazyInitializer.prepareForPossibleSpecialSpecjInitialization()的性能。
- [HHH-7698] - 更高效 LOB 创建
- [HHH-7725] - 使处理大批量HQL多表操作更可插拔
- [HHH-7728] - 在table类中添加equals方法
补丁
- [HHH-6361] - Collection events may contain wrong stored snapshot after merging a detached entity into the persistencecontext
Task
- [HHH-7710] - Align Infinispan 5.x versions in 2LC implementation in 4.1.x branch
Hibernate是一个Java语言下的对象关系映射解决工具。它的工作原理是通过文件(一般有两种:xml文件和properties文件)把值对象和数据库表之间建立起一个映射关系。这样,我们只需要通过操作这些值对象和Hibernate提供的一些基本类,就可以达到使用数据库的目的。例如,使用Hibernate的查询,可以直接返回包含某个值对象的列表(List),而不必向传统的JDBC访问方式一样把结果集的数据逐个装载到一个值对象中,为编码工作节约了大量的时间。Hibernate提供的HQL是一种类SQL语言,它和EJBQL一样都是提供对象化的数据库查询方式,但HQL在功能和使用方式上都非常接近于标准的SQL。
二、Hibernate与JDBC的区别
Hibernate与JDBC的主要区别如下:
1、Hibernate是JDBC的轻量级的对象封装,它是一个独立的对象持久层框架,和App Server,和EJB没有什么必然的联系。Hibernate可以用在任何JDBC可以使用的场合,从某种意义上来说,Hibernate在任何场合下取代JDBC。
2、Hibernate是一个和JDBC密切关联的框架,所以Hibernate的兼容性和JDBC驱动,和数据库都有一定的关系,但是和使用它的Java程序,和App Server没有任何关系,也不存在兼容性问题。
3、Hibernate是做为JDBC的替代者出现的,不能用来直接和Entity Bean做对比。