hi,
I have a problem
with the update collection.
I have 2 classes.
classA and classB
classA
{
...
Collection objectClassB;
}
All id are assigned.
And I made an Interceptor and a class Persistent implements
LifeCycle
When I make
update(objectClassA), I have an exception "Another
object was associated with this id (the object with the given id was already
loaded): "
So, this
exception become from class SessionImpl in method
doUpdate.
The problem is that
I don't understand the test :
else if (old!=null) {
throw new HibernateException("Another object was associated with this id (the object with the given id was already loaded): " +MessageHelper.infoString(persister, id));
}
In this method, old is already not null. so I have already this exception.
So, I have delete this test and I haven't problem.
Could you explain to me why I have already this exception?
And could you tell me if I can delete this test?
Help me
please.