mirror of https://github.com/apache/openjpa.git
OPENJPA-1597 cleanup code comments. merged in from 2.0.x.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@928853 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3df86b0e95
commit
371a31a41a
|
@ -96,9 +96,18 @@ public class Proxies {
|
||||||
* 1) Runtime created proxy (!detachable), then unproxy
|
* 1) Runtime created proxy (!detachable), then unproxy
|
||||||
* 2) No Proxy, then return as-is
|
* 2) No Proxy, then return as-is
|
||||||
* 3) No StateManager (DetachedStateField==false), 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
|
* Get the new IgnoreDetachedStateFieldForProxySerialization
|
||||||
* entity as detached but doesn't remove any $proxy usage
|
* Compatibility flag from either the metadata/configuration if
|
||||||
* 5) Else, unproxy
|
* this is a normal StateManager, otherwise use the new flag
|
||||||
|
* added to the DetachedStateManager
|
||||||
|
* 4) If new 2.0 behavior
|
||||||
|
* 4a) If ClassMetaData exists and DetachedStateField == TRUE
|
||||||
|
* then do not remove the proxy and return as-is
|
||||||
|
* 4b) Else, using DetachedStateField of transient(default) or
|
||||||
|
* false, so unproxy
|
||||||
|
* 5) If 1.0 app or requested old 1.0 behavior
|
||||||
|
* 5a) If detached, then do not unproxy and return as-is
|
||||||
|
* 5b) Else, unproxy
|
||||||
*
|
*
|
||||||
* if (detachable && (proxy == null || proxy.getOwner() == null
|
* if (detachable && (proxy == null || proxy.getOwner() == null
|
||||||
* || proxy.getOwner().isDetached()))
|
* || proxy.getOwner().isDetached()))
|
||||||
|
@ -128,7 +137,7 @@ public class Proxies {
|
||||||
} else if (sm.getContext() != null && sm.getContext().getConfiguration() != null) {
|
} else if (sm.getContext() != null && sm.getContext().getConfiguration() != null) {
|
||||||
compat = sm.getContext().getConfiguration().getCompatibilityInstance();
|
compat = sm.getContext().getConfiguration().getCompatibilityInstance();
|
||||||
} else {
|
} else {
|
||||||
// no-op - using a StateManager, but no Compatibilty settings available
|
// no-op - using a StateManager, but no Compatibility settings available
|
||||||
}
|
}
|
||||||
if (compat != null) {
|
if (compat != null) {
|
||||||
// new 2.0 behavior of using DetachedStateField to determine unproxy during serialization
|
// new 2.0 behavior of using DetachedStateField to determine unproxy during serialization
|
||||||
|
|
Loading…
Reference in New Issue