I have read the article from wiki and ,
the this way of implementing equals and hashcode() is
really weird.
Can't hibernate enhance equals/hashcode() too?
say , when add 2 new instance in session,
hibernate compare them with instance equality,
when 2 detached compared,or 1 detached instance with
1 instance loaded in session,
hibernate can compare them with orig ID(
hibernate may enhance out a new field ,say ,$origID,
and when instance detached, save origID in it).
Is that too hard or do i miss something?
|