openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OPENJPA-2247) JoinColumn annotation is ignored when mapping a unidirectional owned OneToOne that is in a SecondaryTable
Date Fri, 03 Aug 2012 15:42:02 GMT

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

Rick Curtis resolved OPENJPA-2247.
----------------------------------

    Resolution: Fixed

Committed revision 1369043 to trunk.
                
> JoinColumn annotation is ignored when mapping a unidirectional owned OneToOne that is
in a SecondaryTable
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2247
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2247
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.2.0, 2.3.0
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>             Fix For: 2.3.0
>
>
> The runtime incorrectly ignores @JoinColumn.name when mapping a unidirectional owned
OneToOne that is in a SecondaryTable.
> This problem only exists when running with a persistence.xml that is set to 2.0 (version="2.0">).
> For example:
> @Entity
> @SecondaryTable(name = "ParentSecondaryTable", pkJoinColumns = 
>     { @PrimaryKeyJoinColumn(name = "idParent", referencedColumnName = "idParent") })
> public class Parent {
>     @Id
>     @GeneratedValue
>     int idParent;
>     String child_ref;
>     @OneToOne
>     @JoinColumn(name = "CHILD_REF", table = "ParentSecondaryTable", referencedColumnName
= "idChild")
>     PChild child;
> }
> The column "CHILD_REF" will be ignored and the runtime will look for the fk in non-existent
column ParentSecondaryTable.CHILD_IDCHILD.

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

        

Mime
View raw message