gavin wrote:
I have no idea what you are trying to ask, sorry.
sorry gavin, I am little sleepless maybe thats why.
I will try to demonstrate with pseudo-code:
class persistentclass{
private int id;
private int data;
public persistentclass(){
}
// setters, getters for id and data
...
}
class 3rdpartyclass{
public 3rdpartyclass(int id, int data) {
this.id = id; this.data = data;
}
persitent class, is the one I am writing, and 3rdpartyclass is the one I can not change the source code. now, lets say I have my persistent class in db, and
I find it tru hibernate.
persistentclass a = hibernate.load(id);
3rdpartyclass b = new 3rdpartyclass(persistentclass.getid, persistendclass.getdata);
// here I create a 3rd party class, with the data I take from my persistent // class.
is there any way, in hibernate lets say when b gets deleted or changed, a also gets deleted or changed. in other worlds, I want my persistentclass to act as a mirror to my nonpersistend 3rd party class.
is that possible, and how?
Best Regards,
-O.B.