You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2015/04/16 22:13:00 UTC

[jira] [Commented] (OPENJPA-2287) OpenJPA makes fields null

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

Mark Struberg commented on OPENJPA-2287:
----------------------------------------

I've pretty much hit the same issue. 
>From debugging into it seems that the StateManager#fetchObjectField resets the internally stored value to null after the method gets used. 
As the InversManager relies on this field it 'trashes' the later 'normal' usage.

The comment which were on the code seems to indicate that this used to create mem leaks a _very_ long time ago:
{quote}
// don't hold onto strong ref to object
{quote}
This is really ancient code but from what I've seen we can really remove this reset. 

> OpenJPA makes fields null
> -------------------------
>
>                 Key: OPENJPA-2287
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2287
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.2.0
>            Reporter: Maciej Laskowski
>            Priority: Critical
>
> When there are two objects in OneToMany relation and when One sets Many and vice versa the filed Many.one became null. It seems to be related with code added in this issue https://issues.apache.org/jira/browse/OPENJPA-2006. To reproduce: https://github.com/dogenkigen/OpenJPA-bug



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)