Re: [hibernate-dev] Snapshot conflict with merge
I confirm what I said. I added a testcase to HEM. Here is the most accurate thing I can find from the spec 3.4.2 Version Attributes [...] The persistence provider's implementation of the merge operation must examine the version attribute when an entity is being merged and throw an OptimisticLockException if it is discovered that the object being merged is a stale copy of the entity—i.e. that the entity has been updated since the entity became detached. Depending on the implementation strategy used, it is possible that this exception may not be thrown until flush is called or commit time, whichever happens first. [...] Christian Bauer wrote: [hibernate-dev] Snapshot conflict with merge I wrote (tested and verified with Gavin): Finally, merging doesn’t allow the following scenario, where two modifications conflict on one snapshot: item.getId() // The database identity is "1234" item.setDescription(...); Session session= sessionFactory.openSession(); Transaction tx = session.beginTransaction(); Item item2 = (Item) session.get(Item.class, new Long(1234)); item2.setDescription(...); // Not allowed! return session.merge(item); // Throws exception! tx.commit(); session.close(); The detached object’s description is modified as well as the persistent object’s. There is no way for Hibernate to determine who will win in this situation and a StaleObjectStateException is thrown when you try to merge() onto a dirty persistent instance. Emmanuel comments: No exception is raised in my tests. The merged state takes precedence over the initially loaded and modified state (regardless the object has been versioned or not) AFAIR, the spec does not talk about such an exception either. What is it? ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Snapshot conflict with merge
you mean a standard version of optimistick-lock="false"? Christian Bauer wrote: On Sep 26, 2006, at 10:20 PM, Emmanuel Bernard wrote: I confirm what I said. I added a testcase to HEM. Here is the most accurate thing I can find from the spec I took it out of the book until this is clear and stable. By the way, another major thing missing in the spec is standardized version increment checking, that is, which properties have to be dirty for a version increment to happen. Without this being standardized, versioning is completely non-portable. Write it on the list for EJB 4.x :) ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Snapshot conflict with merge
On Sep 26, 2006, at 10:20 PM, Emmanuel Bernard wrote: I confirm what I said. I added a testcase to HEM. Here is the most accurate thing I can find from the spec I took it out of the book until this is clear and stable. By the way, another major thing missing in the spec is standardized version increment checking, that is, which properties have to be dirty for a version increment to happen. Without this being standardized, versioning is completely non-portable. Write it on the list for EJB 4.x :) ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
[hibernate-dev] batch-size algorithm
Currently we create several loaders following a certain algorithm Why don't we create a single loader of batch-size and duplicate ids in the in clause to match unfilled parameters batch-size = 20 uninitialized proxies 17 current algorithm select * from Table where id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) select * from Table where id in (11, 12, 13, 14, 15, 16, 17) current algorithm select * from Table where id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, 17) This would reduce the memory footprint and reduce the prepared statement pool needed This case is a sample but it shines when people set up a batch-size of 100 since the number of queries triggered can drop from 5 to 1 query for 98 uninitialized proxies ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
[hibernate-dev] hibernate-hsqldb-testsuite Build Completed With Testsuite Errors
View results here -> http://cruisecontrol.jboss.com/cc/buildresults/hibernate-hsqldb-testsuite?log=log20060926225125 TESTS FAILEDAnt Error Message: /home/cruisecontrol/work/scripts/build-hibernate-db-matrix.xml:92: The following error occurred while executing this line: /home/cruisecontrol/work/scripts/build-hibernate-db-matrix.xml:83: The following error occurred while executing this line: /home/cruisecontrol/work/scripts/build-common-targets.xml:11: Build Successful - Tests completed with errors or failures.Date of build: 09/26/2006 22:51:25Time to build: 10 minutes 30 secondsLast changed: 12/31/2005 20:44:14Last log entry: less noisy Unit Tests: (911) Total Errors and Failures: (51)testDirtyCheckorg.hibernate.test.instrument.buildtime.InstrumentTesttestFetchAllorg.hibernate.test.instrument.buildtime.InstrumentTesttestLazyorg.hibernate.test.instrument.buildtime.InstrumentTesttestLazyManyToOneorg.hibernate.test.instrument.buildtime.InstrumentTesttestSetFieldInterceptororg.hibernate.test.instrument.buildtime.InstrumentTesttestPropertyInitializedorg.hibernate.test.instrument.buildtime.InstrumentTesttestManyToOneProxyorg.hibernate.test.instrument.buildtime.InstrumentTesttestDirtyCheckorg.hibernate.test.instrument.buildtime.InstrumentTesttestFetchAllorg.hibernate.test.instrument.buildtime.InstrumentTesttestLazyorg.hibernate.test.instrument.buildtime.InstrumentTesttestLazyManyToOneorg.hibernate.test.instrument.buildtime.InstrumentTesttestSetFieldInterceptororg.hibernate.test.instrument.buildtime.InstrumentTesttestPropertyInitializedorg.hibernate.test.instrument.buildtime.InstrumentTesttestManyToOneProxyorg.hibernate.test.instrument.buildtime.InstrumentTesttestJoinedSubclassorg.hibernate.test.joinedsubclass.JoinedSubclassTesttestReturnPropertyComponentRenameorg.hibernate.test.legacy.SQLLoaderTesttestManyToManyPropertyReforg.hibernate.test.propertyref.PropertyRefTesttestFiltersWithSubclassorg.hibernate.test.subclassfilter.DiscrimSubclassFilterTesttestFiltersWithJoinedSubclassorg.hibernate.test.subclassfilter.JoinedSubclassFilterTesttestUnionSubclassorg.hibernate.test.unionsubclass2.UnionSubclassTesttestLazyorg.hibernate.test.bidi.AuctionTesttestNoSelectClauseorg.hibernate.test.jpa.ql.JPAQLComplianceTesttestSubclassingorg.hibernate.test.legacy.ABCProxyTesttestFormulaAssociationorg.hibernate.test.legacy.ABCTesttestComponentNotNullorg.hibernate.test.legacy.ComponentNotNullTesttestCompositeElementorg.hibernate.test.legacy.ComponentNotNullTesttestUnflushedSessionSerializationorg.hibernate.test.legacy.FumTesttestOneToOneCacheorg.hibernate.test.legacy.OneToOneCacheTesttestLoadAfterNonExistsorg.hibernate.test.legacy.ParentChildTesttestSimpleQBEorg.hibernate.test.legacy.QueryByExampleTesttestJunctionNotExpressionQBEorg.hibernate.test.legacy.QueryByExampleTesttestExcludingQBEorg.hibernate.test.legacy.QueryByExampleTesttestBlobCloborg.hibernate.test.legacy.SQLFunctionsTesttestFindBySQLStarorg.hibernate.test.legacy.SQLLoaderTesttestFindBySQLPropertiesorg.hibernate.test.legacy.SQLLoaderTesttestFindBySQLAssociatedObjectsorg.hibernate.test.legacy.SQLLoaderTesttestPropertyResultSQLorg.hibernate.test.legacy.SQLLoaderTesttestFindBySQLMultipleObjectorg.hibernate.test.legacy.SQLLoaderTesttestFindBySQLParametersorg.hibernate.test.legacy.SQLLoaderTesttestDoubleAliasingorg.hibernate.test.legacy.SQLLoaderTesttestEmbeddedCompositePropertiesorg.hibernate.test.legacy.SQLLoaderTesttestFindSimpleBySQLorg.hibernate.test.legacy.SQLLoaderTesttestFindBySQLSimpleByDiffSessionsorg.hibernate.test.legacy.SQLLoaderTesttestFindBySQLDiscriminatedSameSessionorg.hibernate.test.legacy.SQLLoaderTesttestFindBySQLDiscriminatedDiffSessionorg.hibernate.test.legacy.SQLLoaderTesttestCompositeIdIdorg.hibernate.test.legacy.SQLLoaderTesttestSessionStatsorg.hibernate.test.legacy.StatisticsTesttestPaginationorg.hibernate.test.pagination.PaginationTesttestJoinFetchPropertyReforg.hibernate.test.propertyref.PropertyRefTesttestSessionStatisticsorg.hibernate.test.stats.SessionStatsTesttestWhereorg.hibernate.test.where.WhereTest Modifications since last build: (first 50 of 2002)10531modified[EMAIL PROTECTED]//trunk/Hibernate3/doc/reference/en/modules/batch.xmlDocumented insert batch and identity10531modified[EMAIL PROTECTED]//branches/Branch_3_2/Hibernate3/doc/reference/en/modules/batch.xmlDocumented insert batch and identity10527modifiedepbernard//trunk/Hibernate3/src/org/hibernate/hql/ast/tree/SelectClause.javaHHH-2103 rollback mandatory select in JPA10520modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/event/def/AbstractFlushingEventListener.javaHHH-2093 PERSIST_ON_FLUSH ineffective for recursive object graphs10518modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/cfg/Settings.javastrictJPAQLCompliance was a public field10495modified[EMAIL PROTECTED]//trunk/Hibernate3/doc/reference/en/modules/tutorial.xmlAdded warnings about sess
[hibernate-dev] hibernate-sqlserver-jtds-testsuite Build Timed Out
View results here -> http://cruisecontrol.jboss.com/cc/buildresults/hibernate-sqlserver-jtds-testsuite?log=log20060926230241 BUILD TIMED OUTAnt Error Message: build timeoutDate of build: 09/26/2006 23:02:41Time to build: Last changed: 12/31/2005 20:44:14Last log entry: less noisy Unit Tests: (0) Total Errors and Failures: (0) Modifications since last build: (first 50 of 2002)10531modified[EMAIL PROTECTED]//trunk/Hibernate3/doc/reference/en/modules/batch.xmlDocumented insert batch and identity10531modified[EMAIL PROTECTED]//branches/Branch_3_2/Hibernate3/doc/reference/en/modules/batch.xmlDocumented insert batch and identity10527modifiedepbernard//trunk/Hibernate3/src/org/hibernate/hql/ast/tree/SelectClause.javaHHH-2103 rollback mandatory select in JPA10520modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/event/def/AbstractFlushingEventListener.javaHHH-2093 PERSIST_ON_FLUSH ineffective for recursive object graphs10518modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/cfg/Settings.javastrictJPAQLCompliance was a public field10495modified[EMAIL PROTECTED]//trunk/Hibernate3/doc/reference/en/modules/tutorial.xmlAdded warnings about session-per-operation anti-pattern10495modified[EMAIL PROTECTED]//branches/Branch_3_2/Hibernate3/doc/reference/en/modules/tutorial.xmlAdded warnings about session-per-operation anti-pattern10491modified[EMAIL PROTECTED]//trunk/Hibernate3/doc/reference/en/modules/query_hql.xmlDocumented HHH-161510491modified[EMAIL PROTECTED]//branches/Branch_3_2/Hibernate3/doc/reference/en/modules/query_hql.xmlDocumented HHH-161510476modifiedepbernard//trunk/Hibernate3/src/org/hibernate/jdbc/JDBCContext.javalower trace, ignoring a tx join happens a lot in EJB 310473modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/AllTests.javaHHH-1986 : InvocationTargetException on JavassistLazyInitializer10472modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/bytecode/Bean.javaHHH-1986 : InvocationTargetException on JavassistLazyInitializer10472added[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/bytecode/javassist/InvocationTargetExceptionTest.javaHHH-1986 : InvocationTargetException on JavassistLazyInitializer10472added[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/bytecode/BytecodeSuite.javaHHH-1986 : InvocationTargetException on JavassistLazyInitializer10472modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/bytecode/Bean.hbm.xmlHHH-1986 : InvocationTargetException on JavassistLazyInitializer10472added[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/bytecode/cglib/InvocationTargetExceptionTest.javaHHH-1986 : InvocationTargetException on JavassistLazyInitializer10471modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.javaHHH-1986 : InvocationTargetException on JavassistLazyInitializer10470modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/collection/PersistentSet.javaformatting10470modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/collection/PersistentMap.javaformatting10469modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/FlushMode.javaHHH-2042 : FlushMode javadoc10461modifiedepbernard//trunk/Hibernate3/src/org/hibernate/proxy/EntityNotFoundDelegate.javarollback10455modifiedepbernard//trunk/Hibernate3/src/org/hibernate/proxy/EntityNotFoundDelegate.javaEJB-160 make Ejb3Configuration and AnnotationConfiguration serializable and allow JNDI referenceEntityNotFoundDelegate must be serializable10451addedepbernard//trunk/HibernateExt/ejb/src/test/org/hibernate/ejb/test/cascade/FetchTest2.javaEJB-221 TransientObjectException raised on proxies during persist_on_fllush.noCascade()10451modifiedepbernard//trunk/Hibernate3/src/org/hibernate/engine/CascadingAction.javaEJB-221 TransientObjectException raised on proxies during persist_on_fllush.noCascade()10451addedepbernard//trunk/HibernateExt/ejb/src/test/org/hibernate/ejb/test/cascade/Soldier2.javaEJB-221 TransientObjectException raised on proxies during persist_on_fllush.noCascade()10451addedepbernard//trunk/HibernateExt/ejb/src/test/org/hibernate/ejb/test/cascade/Troop2.javaEJB-221 TransientObjectException raised on proxies during persist_on_fllush.noCascade()10450modifiedjdkim528//trunk/Hibernate3/doc/reference/ko/modules/basic_mapping.xml10449deletedjdkim528//trunk/Hibernate3/doc/reference/ko/fop/Gulim.xmlRemoved Gulim.xml, Readme4font.txtAdded Hankc.ttf, Hankc.xml10449addedjdkim528//trunk/Hibernate3/doc/reference/ko/fop/Hankc.ttfRemoved Gulim.xml, Readme4font.txtAdded Hankc.ttf, Hankc.xml10449addedjdkim528//trunk/Hibernate3/doc/reference/ko/fop/Hankc.xmlRemoved Gulim.xml, Readme4font.txtAdded Hankc.ttf, Hankc.xml10449deletedjdkim528//trunk/Hibernate3/doc/reference/ko/fop/ReadMe4Font.txtRemoved Gulim.xml, Readme4font.txtAdded Hankc.ttf, Hankc.xml10448modified