[hibernate-dev] Need help to fix HHH-1570

Julien HENRY henryju at yahoo.fr
Fri Jul 23 09:53:02 EDT 2010


Hi Hibernate dev team,

I am working on a patch to fix HHH-1570. The patch is highly inspired from the 
old patch attached to the JIRA issue with a few modifications. After applying my 
patch the test case (see patch HHH-1570-it.patch attached to the issue) runs 
fine but there is a regression on another test: FumTest.testKeyManyToOne()

Here is the error on the test:
testKeyManyToOne(org.hibernate.test.legacy.FumTest)  Time elapsed: 0.61 sec  <<< 
ERROR!
org.hibernate.NonUniqueObjectException: a different object with the same 
identifier value was already associated with the session: 
[org.hibernate.test.legacy.Middle#org.hibernate.test.legacy.MiddleKey at 57def1]
    at 
org.hibernate.engine.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:637)

    at 
org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:120)

    at 
org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:73)

    at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:955)
    at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:933)
    at org.hibernate.test.legacy.FumTest.testKeyManyToOne(FumTest.java:677)

Can someone review my patch (attached) and help me to fix the regression as I 
don't understand the error.

Thanks

Julien



      


More information about the hibernate-dev mailing list