The common solution i found is that the object might be in the session cache , so If that object is modified for the reason of persistance this error is thrown. Provided the cascade style is save or Update.
The solution is to choose the cascade as merge or evict the object from the session.
I tried both unsuccessfully. Pretty sure I messed up in the code. so please help me to resolve the error.