Reputation: 624
I have created two instances of one particular VO(view) in my application module. Now, when I have made changes (did not commit yet) in one view instance, it is reflected in another view instance also. For ex: let say there is StudentVO and I have created two instances(std1,std2) of StudentVO in my AM. I have queried both VOs (std1,std2) for one particular student,i.e. both are currently holding same student record. Now I have modified one attribute, lets say marks for std1. It is reflected in std2 as well. Is there a way to stop them ?...I have to see old marks in std2 and modified marks in std1.
Upvotes: 0
Views: 175
Reputation: 1657
This happens because your VO is based on a EO. This would not happen for a VO based on a query, but of course, you need the EO based VOs to update records. You would need two different VO’s based on different EOs, or one of the VOs to be based on a Query.
Upvotes: 1