The hibernate entity I am saving in the database (Oracle) has very complex relations, in the sense that it has many related entities. It looks something like this...
<This happened to me under the following circumstances:
When objectA was saved, objectB was updated in the database to add the id of objectA.
Then I added an objectC to objectA (one objectA for many objectCs). I tried to update objectA and got the stalestateexception....even when using merge.
The answer is that I needed to either update objectB or retrieve a fresh istance of objectA from the database
The error can be caused by several things:
I'm not taking the credit for it, found it here.