I have a reference A to an entity C that has not been persisted. I invoke merge and obtain a reference B to the merged instance. (the Id has not been set as it is a generated Id). If I serialize and deserialize B, update an attribute and perform a merge, this does not associate itself with C (probably because no Id has been set).
It used to be that you could manipulate this situation as hibernate would use equals to test for equality. So you could have a javax.persistence.Transient that holds a transient identifier that you could use in the equals method. It does not appear to use equals any more so what can I do to achieve the same results?
|