openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Guo (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (OPENJPA-1109) Entry get lost when attachCollection
Date Thu, 28 May 2009 21:29:45 GMT

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

Jim Guo edited comment on OPENJPA-1109 at 5/28/09 2:28 PM:
-----------------------------------------------------------

I can provide a patch if push the collection last is acceptable. 
And also want to know if we have other better solutions.

      was (Author: jimguo):
    I can provide a patch to if push the collection last is acceptable. 
And also want to know if we have other better solutions.
  
> Entry get lost when attachCollection
> ------------------------------------
>
>                 Key: OPENJPA-1109
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1109
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.1
>         Environment: N/A
>            Reporter: Jim Guo
>         Attachments: jira-test-case.zip
>
>
> This has been a problem when merge a parent object, the parent object has a set with
child as entry. The child object equals() method are rely on child.key property. 
> In some case, the parent.children set was attached before the child.key property was
attached. Then only one entry will be in the set since the children are equals() with child.key=null.
> Possible solution: Move collection to be process last while attach an object. This give
a chance for all other single property been attached, so it won't break the equals() logic.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message