openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donald Woods (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (OPENJPA-1201) "Mapped by" field not set when contained in superclass
Date Mon, 14 Sep 2009 14:53:09 GMT

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

Donald Woods resolved OPENJPA-1201.
-----------------------------------

    Resolution: Fixed
      Assignee: Michael Dick  (was: Donald Woods)

Mike/David, please reopen if you'd like to apply the patch to other branches.

> "Mapped by" field not set when contained in superclass 
> -------------------------------------------------------
>
>                 Key: OPENJPA-1201
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1201
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: David Minor
>            Assignee: Michael Dick
>             Fix For: 1.3.0, 2.0.0-M3
>
>         Attachments: openjpa_superclass_collection.patch, test-abstract-class-inverse-relation.patch
>
>
> The mapped by field (inverse relation) is not set when the field is contained in a superclass.
In my case the problem was with a collection of objects of the same type (i.e. a hierarchy),
and using parallel eager fetch mode, but I think the problem may be more general.
> I tracked the problem to the setMappedBy() method in JDBCStoreManager, which is calling
getDeclaredFieldMappings(), but the result of this call doesn't include superclass field mappings.
Changing it to getFieldMappings() fixed the problem.

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