Change the reference. But why would you want something like this. I'm sure that this could be refactored to something that's much nicer.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Joined: Jun 14, 2010
Thanks a lot for reply...
actually, x is my original object & y is similar object, I am carrying choices of user request and as per user choice updating data in y, but at any level user can undo all/any of his choices & in that case I need original data. Then further user can update his choice & undo the choice, until submit the final request.