P
Pieter
Hi,
In my object oriented application (VB.NET 2.0, Windows Forms), a lot of
objects are opened in different forms by a user. For instance (a stupid
exemple, but it shows the easiest what's happening):
-> two instances of the Company-Object: MyCompany1 and MyCompany2, both of
them are poiting to the same Company: for isntance the Company Microsoft.
The problem is: if the user makes changes to one of the 2 instances, these
changes are not automaticly made to the other instance. So what I somehow
would need is a way that there is some local cache of the opened Business
Objects, and in one is asked that is already opened, that a reference is
given to the same object.
This must definetly be something that is a common practice in OOP, but I
can't find out how to do this?
And a secondary question: As we will start using Hibernate in some time: is
this kind of technique usable with NHibernate?
Thanks a lot in advance,
Pieter
In my object oriented application (VB.NET 2.0, Windows Forms), a lot of
objects are opened in different forms by a user. For instance (a stupid
exemple, but it shows the easiest what's happening):
-> two instances of the Company-Object: MyCompany1 and MyCompany2, both of
them are poiting to the same Company: for isntance the Company Microsoft.
The problem is: if the user makes changes to one of the 2 instances, these
changes are not automaticly made to the other instance. So what I somehow
would need is a way that there is some local cache of the opened Business
Objects, and in one is asked that is already opened, that a reference is
given to the same object.
This must definetly be something that is a common practice in OOP, but I
can't find out how to do this?
And a secondary question: As we will start using Hibernate in some time: is
this kind of technique usable with NHibernate?
Thanks a lot in advance,
Pieter