OPENJPA-1597 merge in code comment updates from 2.0.x branch

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@929550 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald Woods 2010-03-31 14:33:02 +00:00
parent 8579593f88
commit 0df0c0142f
1 changed files with 8 additions and 9 deletions

View File

@ -87,15 +87,6 @@ public class Proxies {
* 1) No Proxy, then return as-is * 1) No Proxy, then return as-is
* 2) Runtime created proxy (!detachable), then unproxy * 2) Runtime created proxy (!detachable), then unproxy
* 3) No StateManager (DetachedStateField==false), then return as-is * 3) No StateManager (DetachedStateField==false), then return as-is
* 4) If detached, then unproxy
* 5) If ClassMetaData exists and DetachedStateField != TRUE
* (default of DetachedStateField==transient), then unproxy
* 6) Else, return as-is
*
* Original code -
* 1) Runtime created proxy (!detachable), then unproxy
* 2) No Proxy, then return as-is
* 3) No StateManager (DetachedStateField==false), then return as-is
* Get the new IgnoreDetachedStateFieldForProxySerialization * Get the new IgnoreDetachedStateFieldForProxySerialization
* Compatibility flag from either the metadata/configuration if * Compatibility flag from either the metadata/configuration if
* this is a normal StateManager, otherwise use the new flag * this is a normal StateManager, otherwise use the new flag
@ -109,6 +100,14 @@ public class Proxies {
* 5a) If detached, then do not unproxy and return as-is * 5a) If detached, then do not unproxy and return as-is
* 5b) Else, unproxy * 5b) Else, unproxy
* *
* Original code -
* 1) Runtime created proxy (!detachable), then unproxy
* 2) No Proxy, then return as-is
* 3) No StateManager (DetachedStateField==false), then return as-is
* 4) If detached, then return as-is <--- ERROR as EM.clear() marks
* entity as detached but doesn't remove any $proxy usage
* 5) Else, unproxy
*
* if (detachable && (proxy == null || proxy.getOwner() == null * if (detachable && (proxy == null || proxy.getOwner() == null
* || proxy.getOwner().isDetached())) * || proxy.getOwner().isDetached()))
* return proxy; * return proxy;