From: Josh M. (JIRA) <no...@at...> - 2006-07-19 20:37:59
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1921?page=comments#action_23673 ] Josh Moore commented on HHH-1921: --------------------------------- Index: DefaultFlushEntityEventListener.java =================================================================== --- DefaultFlushEntityEventListener.java (revision 10125) +++ DefaultFlushEntityEventListener.java (working copy) @@ -251,7 +251,7 @@ // if it was dirtied by a collection only int[] dirtyProperties = event.getDirtyProperties(); - if ( event.isDirtyCheckPossible() && dirtyProperties==null ) { + if ( !substitute && event.isDirtyCheckPossible() && dirtyProperties==null ) { if ( !event.hasDirtyCollection() ) { throw new AssertionFailure("dirty, but no dirty properties"); } is working for me. Attached test passes. My code passes. The list of tests which fail from TRUNK is similar to that listed on HHH-1401 (http://opensource.atlassian.com/projects/hibernate/browse/HHH-1401#action_23666), i.e. it doesn't seem to have broken too much. [junit] TEST org.hibernate.test.cuk.CompositePropertyRefTest FAILED [junit] TEST org.hibernate.test.hql.ASTParserLoadingTest FAILED [junit] TEST org.hibernate.test.hql.CriteriaHQLAlignmentTest FAILED [junit] TEST org.hibernate.test.hql.HQLTest FAILED [junit] TEST org.hibernate.test.legacy.SQLLoaderTest FAILED [junit] TEST org.hibernate.test.optlock.OptimisticLockTest FAILED [junit] TEST org.hibernate.test.orphan.PropertyRefTest FAILED [junit] TEST org.hibernate.test.propertyref.PropertyRefTest FAILED [junit] TEST org.hibernate.test.readonly.ReadOnlyTest FAILED [junit] TEST org.hibernate.test.sql.GeneralTest FAILED (SQLLoaderTest was added but that is more likely due to the difference in versions: 10123 --> 10125) > "dirty, but no dirty properties" thrown when Interceptor resets properties. > --------------------------------------------------------------------------- > > Key: HHH-1921 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1921 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.cr2 > Environment: java version "1.5.0_07" > Hibernate 3.2.cr2 > Reporter: Josh Moore > Attachments: InterceptorTest.java, ResetInterceptor.java, dirtybutnotdirty.zip > > > When Interceptor.onfindDirty() resets properties to their DB value, the check in DefaultFlushEntityEventListener.scheduleUpdate: > // if it was dirtied by a collection only > int[] dirtyProperties = event.getDirtyProperties(); > if ( event.isDirtyCheckPossible() && dirtyProperties==null ) { > if ( !event.hasDirtyCollection() ) { > throw new AssertionFailure("dirty, but no dirty properties"); > } > dirtyProperties = ArrayHelper.EMPTY_INT_ARRAY; > } > fails needlessly. > Attached test has been confirmed against SVN TRUNK: > URL: http://anonhibernate.labs.jboss.com/trunk/Hibernate3 > Revision: 10125 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |