LaLiLuna wrote:
I do not think that this is an issue of hashCode or equal.
may be your object is resaved as you have not properly removed it.
eg. bidrectional many to one
A.getBs().remove(A)
B.setA(null)
session.remove(B);
If this is not hte case you should post your complete code and mappings.
Sebastian
I mean that the object is not removed from the Set because they are two different objects (in the JVM) I am doing session.remove(b) and it gets deleted from the db. but when I do A.getBs().remove(A) it doesn`t get removed because of hashCode and isEqual()
when the A and the B is retreived under the same transaction this works.
but it should suffice to retreive them under the same session, as far as I remember.
or am I wrong?