openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Struberg (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1933) @ElementCollection loose proxytype after serialisation
Date Wed, 09 Feb 2011 12:11:58 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992453#comment-12992453
] 

Mark Struberg commented on OPENJPA-1933:
----------------------------------------

omg, pretty heavy to find this issue.

The reason why it used to work in the openjpa-persistence-jdbc test was due to the old persistende_1.0
schema!
And in my regression test (as in my real world project) I use the version="2.0" of the persistence.xml
schema

I was able to run the regression test after adding
<property name="openjpa.Compatibility" value="IgnoreDetachedStateFieldForProxySerialization=true"/>

Conclusio: there is a fish in our deserialisation logic because the DetachedStateManager doesn't
create proxies for Collections, Maps, etc anymore...

Question: which side effects does using IgnoreDetachedStateFieldForProxySerialization=true
have? *shudder* 

> @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

        

Mime
View raw message