I dont think that this is problem if you mean
Uvazek u = ppv.uvazeks.iterator().next(); u.ppv = null; ppv.uvazeks.remove(u);
is right code for remove entity from collection??
With this fix test still fails.
Things changed after this change
Ppv ppv = (Ppv) getSession().get(Ppv.class, 1l);
getSession().clear();
ppv.uvazeks.remove(ppv.uvazeks.iterator().next());
ppv = (Ppv)getSession().merge(ppv);
getSession().flush();
getSession().clear();
ppv.uvazeks.remove(ppv.uvazeks.iterator().next());
getSession().merge(ppv);
getSession().flush();
Problem is that we work with original entity after first merge instead of working with copy returned from merge. Is this forbidden?? This different behavior is probably caused by https://hibernate.atlassian.net/browse/HHH-6361.
|