The following seems to work, but I have no clue if it's the best way to reload an object:
public void reload(Object obj) { ClassDescriptor cld = pb.getClassDescriptor(obj.getClass()); cld.setAlwaysRefresh(true); pb.getObjectByQuery(new QueryByIdentity(obj)); }
Any comments?
"pb.retrieveAllReferences(obj);" needs to be added ... that's what I'm using now:
public void reload(Object ojb) { ClassDescriptor cld = pb.getClassDescriptor(rechnung.getClass()); synchronized (cld) { boolean refresh = cld.isAlwaysRefresh(); cld.setAlwaysRefresh(true); pb.getObjectByQuery(new QueryByIdentity(obj)); pb.retrieveAllReferences(obj); cld.setAlwaysRefresh(refresh); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]