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

Heath Thomann commented on OPENJPA-2252:
----------------------------------------

Hi Helen!  Does your fix still require 
openjpa.DetachState="DetachedStateField=true" to be set?  As I understand it, 
the extra update only occurs when an entity, which contains an Embeddable, is 
serialized/deserialized and then merged.  In this case, when an entity is 
serialized, some of its state (detached state) is removed (i.e. this 
state is transient).  As such, when the entity is merged, state 
necessary for OpenJPA to determine if the entity should be updated is 
not available.  In order for necessary state to be serialized with the entity, a 'DetachedStateField' needs to be used.....this field will aid OpenJPA during the merge.
  Is my understanding correct?  If so, then I'm assuming that even with your 
fix, we still need a 'DetachedStateField' to preserves the necessary state 
across serialization boundaries in order to help OpenJPA determine if an update 
is needed during a merge?

                
> Unexpected update statement when merging a serialized and no-change entity 
> with the embedded field
> --------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2252
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2252
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.0.1, 2.1.1, 2.2.0, 2.3.0
>            Reporter: Helen Xu
>            Assignee: Helen Xu
>         Attachments: OPENJPA-2252.patch
>
>
> The unexpected update statement was observed when merging a serialized and 
> deserialized entity which has no change and contains the embedded field.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to