You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Jeremy Bauer (JIRA)" <ji...@apache.org> on 2011/01/04 21:40:45 UTC

[jira] Assigned: (OPENJPA-1913) If fetch-groups is used, detaching an entity will lead to all lazy loaded members get reset to null

     [ https://issues.apache.org/jira/browse/OPENJPA-1913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Bauer reassigned OPENJPA-1913:
-------------------------------------

    Assignee: Jeremy Bauer

> If fetch-groups is used, detaching an entity will lead to all lazy loaded members get reset to null
> ---------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1913
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1913
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.1.0
>            Reporter: Mark Struberg
>            Assignee: Jeremy Bauer
>             Fix For: 2.2.0
>
>         Attachments: OPENJPA-1913-enhancer-fix.patch, OPENJPA-1913-test.patch
>
>
> If I use openjpa.DetachState=fetch-groups and detach an entity with a lazy loaded list, this list gets reset to null.
> An example:
> class @Entity Person {
>    private String name;
>     @OneToMany(mappedBy = "group", cascade = {CascadeType.ALL})
>     private List<Subscription> subscriptions = new ArrayList<Subscription>();
>  ...}
> I load the Person and access the subscriptions inside a transaction. I get a person instance with e.g. 3 subscriptions. 
> If I now close the EntityManager and my person gets detached, the subscriptions list is suddenly null!

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