mseritan wrote:
Ranjee29,
Another approach is to clone the map into a private object when sending the object over the fence and compare the content of the map when the object comes back. Throw an exception if you can get away with it ;)
Marius
Well I really dont want to make the Hibernate changes visible on the client-side unless the client has made some fetch request to the server, as this would imply that I have to send back all the inserted objects back on to the client-side and somehow merge this state with the original state of objects on the client-side (which I might not have access to) and also the application does bulk inserts at times for which this solution is even worse.
And also i dont want to do a DB cleaning at scheduled times as that again would not fit into our applications expected functionality, and also there can be too many relationships that can potentially produce orphans.
But anyways thanks a lot for your suggestions. :)