This question is locked. New answers and comments are not allowed.
Hi,
Let's assume that my persistent class inherits and implements the IInstanceCallbacks interface. I would like to do slightly different things while creating a new object and while modifying an existing one. I don't want to distinguish new and existing objects checking some properties for specific values (e.g. 0 for autoincrement identity). Outside the object I can use the scope object: scope.IsNew(persistent object) but when executing PreStore method (for example) I haven't got the scope object. This leads to this topic's title: the object is always maintained using some IObjectScope object; how (if ever) can I get this object being "inside" the persistent object?
Regards
Tomasz
Let's assume that my persistent class inherits and implements the IInstanceCallbacks interface. I would like to do slightly different things while creating a new object and while modifying an existing one. I don't want to distinguish new and existing objects checking some properties for specific values (e.g. 0 for autoincrement identity). Outside the object I can use the scope object: scope.IsNew(persistent object) but when executing PreStore method (for example) I haven't got the scope object. This leads to this topic's title: the object is always maintained using some IObjectScope object; how (if ever) can I get this object being "inside" the persistent object?
Regards
Tomasz