[ https://issues.apache.org/jira/browse/OPENJPA-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998146#comment-12998146 ]
Michael Dick commented on OPENJPA-1933: --------------------------------------- Here's where my story falls apart : org.apache.openjpa.util.Proxies:156 if (useDSFForUnproxy) { // use new 2.0 behavior if ((meta != null) && (Boolean.TRUE.equals(meta.usesDetachedState()))) { // configured to always use and serialize a StateManger, so keep any $proxy return proxy; } else { // already detached or using DetachedStateField==false or transient, so remove any $proxy return proxy.copy(proxy); } } With a 2.0 persistence.xml we will check the meta.usesDetachedState() in addition to the DSM and IgnoreDetachedTooLongToTypeCompatibilityOption. I have not fully unraveled that method - there's some room for improvement in this path. Sorry you had to hit this particular tangle. > @ElementCollection loose proxytype after serialisation > ------------------------------------------------------ > > Key: OPENJPA-1933 > URL: https://issues.apache.org/jira/browse/OPENJPA-1933 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 2.0.0, 2.0.1 > Reporter: Mark Struberg > Priority: Critical > Fix For: 2.2.0 > > Attachments: OPENJPA-1933-test-2.patch, OPENJPA-1933-test.patch, > openjpa-reg-tests.tar.gz > > > usually an @ElementCollection field loaded from the database will be created > as a org.apache.openjpa.java$.util$.ArrayListProxy. > After serialisation/deserialisation (with DetachedStateField=true) the List > will be recreated as standard java.util.ArrayList. > This has the bad side effect, that any subsequent add to this > ElementCollection will not set the _dirty field in the DetachedStateManager > and any changes in the ElementCollection will not get saved to the database. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira