|
Now throws IllegalArgumentException
Sorry but I do not understand. Do you mean that now I will always have the IllegalArgumentException?
Or only in the case reported above? In both cases, why? Why it works right in Hibernate 2.1.8, and throws the exception now? And, most important: why 1 overload of session.load() works and the other one cause an exception? (While in 2.1.8 both works right). Is there any mistake in my code? Reagards Alessandro Rizzi I had a similar problem with the use of Session.evict() and subsequently trying to reassociate within the same session (i.e. before Session.close) using Session.save() (or update).
For the most part, it seemed to resolve if I called Session.flush() after the Session.evict(). I still had problems trying to use the evicted instance to Session.load() an object for deletion though. I ended up tossing the whole idea out and going with the optimistic concurrency collision detection that Hibernate supports (i.e. versions/timestamps). |
||||||||||||||||||||||||||||||||||||||||||||||||
Alessandro