We have just released 3.5.0-CR-2. The main focus for this release was bugfixes and documentation.
Please forgive the terseness of this entry. I am quite tired :)
Moving forward in the next 2 weeks we still have some documentation tasks to finish up and handle any bug reports that come back in to Jira. As we get closer to that time, we will decide whether 3.5.0.Next becomes 3.5.0-CR-3 or 3.5.0-Final.
Created: 25. Feb 2010, 13:23 CET (Steve Ebersole)
We've been using 3.5.0-CR1 for awhile without issue, this morning I changed out poms to use CR2 and immediate hit problems with getting duplicate primary keys.
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "rest_request_pkey" at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1608) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1343) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:194) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:304) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.invoke(AbstractJdbc23PooledConnection.java:477) at $Proxy47.executeUpdate(Unknown Source) at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2418) ... 73 more
For our setup we're using Hibernate 3.5.0-CR2, Atomikos JTA, PostgreSQL 8.4.
excelent work!!!!!!!!
Nice work i can't wait to check the new JPA support
with this we upgraded from 3.3.2. My today highlight: Unidirectional OneToMany with DeleteOrphan works well with EM.merge()
Congratulations to the whole package to the Core Team !
Andre
Hibernate 3.5.0-CR2 issue: - Deprecated method "SessionFactory.evictQueries()" => DOES NOT WORK - Considering "SessionFactory.evictQueries()" changed to "SessionFactoy.getCache().evictQueryRegions()" => ALSO DOES NOT WORK
Using "Hibernate 3.5.0-CR-2" and "EhCache 2.0" with "second_level_cache" and "query_cache". - When enabling these caches with JOIN FETCH the SELECT N+1 issue appears. If I disable both caches the N+1 issue does not happen: --------------------------------------------------------- Primary Key is (SYSTEM_CODE, NCODE) CREATE TABLE FW_STATUS_TRANSLATE ( SYSTEM_CODE VARCHAR2(3 BYTE) NOT NULL , NCODE VARCHAR2(20 BYTE) NOT NULL , NDESC VARCHAR2(255 BYTE) , ECODE VARCHAR2(10 BYTE) , EDESC VARCHAR2(255 BYTE) , ACCAO VARCHAR2(48 BYTE) , RESPONSAVEL VARCHAR2(48 BYTE) , ACCAORECURSO VARCHAR2(48 BYTE) , RESPONSAVELRECURSO VARCHAR2(48 BYTE) , EVENTSTATUS VARCHAR2(100 BYTE) DEFAULT NULL ) ---- Primary Key is (SYSTEM_CODE) CREATE TABLE PTC_SISTEMA_LEGACY ( "SYSTEM_CODE" VARCHAR2(3 BYTE) NOT NULL ENABLE, "SYSTEM_DESC" VARCHAR2(50 BYTE) ) NOTE: There is a foreign key from FW_STATUS_TRANSLATE.SYSTEM_CODE to PTC_SISTEMA_LEGACY.SYSTEM_CODE --------------------------------------------------------- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="org.ptsi.data.model.FwStatusTranslate" table="FW_STATUS_TRANSLATE" dynamic-insert="true" dynamic-update="true" lazy="false"> <cache usage="read-write"/> <composite-id mapped="true" class="org.ptsi.data.model.FwStatusTranslatePK"> <key-many-to-one name="system_code" class="org.ptsi.data.model.PtcSistemaLegacy"> <column name="SYSTEM_CODE"/> </key-many-to-one> <key-property name="ncode"> <column name="NCODE" sql-type="VARCHAR2(10 BYTE)" length="10"/> </key-property> </composite-id> <property name="ndesc"> <column name="NDESC" sql-type="VARCHAR2(255 BYTE)" length="255"/> </property> <property name="ecode"> <column name="ECODE" sql-type="VARCHAR2(10 BYTE)" length="10"/> </property> <property name="edesc"> <column name="EDESC" sql-type="VARCHAR2(255 BYTE)" length="255"/> </property> <property name="accao"> <column name="ACCAO" sql-type="VARCHAR2(48 BYTE)" length="48"/> </property> <property name="responsavel"> <column name="RESPONSAVEL" sql-type="VARCHAR2(48 BYTE)" length="48"/> </property> <property name="accaoRecurso"> <column name="ACCAORECURSO" sql-type="VARCHAR2(48 BYTE)" length="48"/> </property> <property name="responsavelRecurso"> <column name="RESPONSAVELRECURSO" sql-type="VARCHAR2(48 BYTE)" length="48"/> </property> <property name="eventStatus"> <column name="EVENTSTATUS" sql-type="VARCHAR2(100 BYTE)" length="100"/> </property> </class> </hibernate-mapping> ---------------------------- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="org.ptsi.data.model.PtcSistemaLegacy" table="PTC_SISTEMA_LEGACY" dynamic-insert="true" dynamic-update="true" lazy="false"> <cache usage="read-only"/> <composite-id mapped="true" class="org.ptsi.data.model.PtcSistemaLegacyPK"> <key-property name="system_code"> <column name="SYSTEM_CODE" sql-type="VARCHAR2(3 BYTE)" length="3"/> </key-property> </composite-id> <property name="system_desc"> <column name="SYSTEM_DESC" sql-type="VARCHAR2(50 BYTE)" length="50"/> </property> </class> </hibernate-mapping> ---------------------------- hibernateSession.createQuery( "FROM FwStatusTranslate t1 " + "LEFT JOIN FETCH t1.system_code " + "ORDER BY TO_NUMBER( SUBSTR( t1.ecode, 2 ) )" ); ---------------------------
Using "Hibernate 3.5.0-CR-2" and "EhCache 2.0" with "second_level_cache" and "query_cache". - When enabling these caches with JOIN FETCH the SELECT N+1 issue appears. If I disable both caches the N+1 issue does not happen: --------------------------------------------------------- Primary Key is (SYSTEM_CODE, NCODE) CREATE TABLE FW_STATUS_TRANSLATE ( SYSTEM_CODE VARCHAR2(3 BYTE) NOT NULL , NCODE VARCHAR2(20 BYTE) NOT NULL , NDESC VARCHAR2(255 BYTE) , ECODE VARCHAR2(10 BYTE) , EDESC VARCHAR2(255 BYTE) , ACCAO VARCHAR2(48 BYTE) , RESPONSAVEL VARCHAR2(48 BYTE) , ACCAORECURSO VARCHAR2(48 BYTE) , RESPONSAVELRECURSO VARCHAR2(48 BYTE) , EVENTSTATUS VARCHAR2(100 BYTE) DEFAULT NULL ) ---- Primary Key is (SYSTEM_CODE) CREATE TABLE PTC_SISTEMA_LEGACY ( SYSTEM_CODE VARCHAR2(3 BYTE) NOT NULL ENABLE, SYSTEM_DESC VARCHAR2(50 BYTE) ) NOTE: There is a foreign key from FW_STATUS_TRANSLATE.SYSTEM_CODE to PTC_SISTEMA_LEGACY.SYSTEM_CODE --------------------------------------------------------- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="org.ptsi.data.model.FwStatusTranslate" table="FW_STATUS_TRANSLATE" dynamic-insert="true" dynamic-update="true" lazy="false"> <cache usage="read-write"/> <composite-id mapped="true" class="org.ptsi.data.model.FwStatusTranslatePK"> <key-many-to-one name="system_code" class="org.ptsi.data.model.PtcSistemaLegacy"> <column name="SYSTEM_CODE"/> </key-many-to-one> <key-property name="ncode"> <column name="NCODE" sql-type="VARCHAR2(10 BYTE)" length="10"/> </key-property> </composite-id> <property name="ndesc"> <column name="NDESC" sql-type="VARCHAR2(255 BYTE)" length="255"/> </property> <property name="ecode"> <column name="ECODE" sql-type="VARCHAR2(10 BYTE)" length="10"/> </property> <property name="edesc"> <column name="EDESC" sql-type="VARCHAR2(255 BYTE)" length="255"/> </property> <property name="accao"> <column name="ACCAO" sql-type="VARCHAR2(48 BYTE)" length="48"/> </property> <property name="responsavel"> <column name="RESPONSAVEL" sql-type="VARCHAR2(48 BYTE)" length="48"/> </property> <property name="accaoRecurso"> <column name="ACCAORECURSO" sql-type="VARCHAR2(48 BYTE)" length="48"/> </property> <property name="responsavelRecurso"> <column name="RESPONSAVELRECURSO" sql-type="VARCHAR2(48 BYTE)" length="48"/> </property> <property name="eventStatus"> <column name="EVENTSTATUS" sql-type="VARCHAR2(100 BYTE)" length="100"/> </property> </class> </hibernate-mapping> ---------------------------- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="org.ptsi.data.model.PtcSistemaLegacy" table="PTC_SISTEMA_LEGACY" dynamic-insert="true" dynamic-update="true" lazy="false"> <cache usage="read-only"/> <composite-id mapped="true" class="org.ptsi.data.model.PtcSistemaLegacyPK"> <key-property name="system_code"> <column name="SYSTEM_CODE" sql-type="VARCHAR2(3 BYTE)" length="3"/> </key-property> </composite-id> <property name="system_desc"> <column name="SYSTEM_DESC" sql-type="VARCHAR2(50 BYTE)" length="50"/> </property> </class> </hibernate-mapping> ---------------------------- hibernateSession.createQuery( "FROM FwStatusTranslate t1 " + "LEFT JOIN FETCH t1.system_code " + "ORDER BY TO_NUMBER( SUBSTR( t1.ecode, 2 ) )" ); ---------------------------For the Ehcache 2.0 issue we will look into it and see if it is an Ehcache or a Hibernate bug. Assuming the former I have created a JIRA at https://jira.terracotta.org/jira/browse/EHC-656.
Can you please provide some more detail there and a way we can contact you to discuss the issue and how to reproduce.
I just found out the specific context for which these "evict" and reload behaviors happen. It seems that this happens when a query involves more than one table. In the before mentioned tables if I do this query: hibernateSession.createQuery( "FROM ScdmClasseCodigo t, FwStatusTranslate t1 " + "LEFT JOIN FETCH t1.system_code " + "WHERE t.classe = SUBSTR( t1.ecode, 1, 1 ) " + "ORDER BY TO_NUMBER( SUBSTR( t1.ecode, 2 ) )" );This is not an issue tracker!
First that all many thanks for everything, but I am waiting for the final version.... when this can be?
Where can we find documentation on JPA 2 annotations. I can't find anything save a bunch of articles on collections of elements. And how about a migration guide for migrating your hibernate entities annotations to jpa 2 annotations? I tried switching an existing project and the source code went all from all the now suddenly unsupported hibernate annotations.
Huh? We have removed not a single annotation.
We are in the process of documentation tasks. After that we will release a final.
My bad, I thought rolling annotations and entity into core meant the core distribution and I had removed them from my pom.
I wanna download and use hibernate .Kindly suggest the webpage where i can download hibernate latest version?
In Anticipation
With Regards
Reuben Appadurai[My Link=>]