Lmichasz wrote:
If courseService.load has its own session and courseService.loadQuizById also has its own session then q and quiz can be diffrent objects so their courses can be diffrent to.
Try to make equals between object from one session (maby better transaction) or overwrite course.equals and use it as a base class for proxy.
They have the same memory reference! and then title is the same, course is the same (course has a method equals that check its name).
If i added the line
if(this == o) return true;
everything is ok, but i don't understand this behavior...