You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Rick Curtis (JIRA)" <ji...@apache.org> on 2012/08/03 17:31:02 UTC
[jira] [Created] (OPENJPA-2247) JoinColumn annotation is ignored
when mapping a unidirectional owned OneToOne that is in a SecondaryTable
Rick Curtis created OPENJPA-2247:
------------------------------------
Summary: 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
[jira] [Commented] (OPENJPA-2247) JoinColumn annotation is ignored
when mapping a unidirectional owned OneToOne that is in a SecondaryTable
Posted by "Heath Thomann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466945#comment-13466945 ]
Heath Thomann commented on OPENJPA-2247:
----------------------------------------
HI! Please note that part of this fix (Revision 1369042) was incorrectly listed under JIRA OPENJPA-2229.
Thanks,
Heath
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (OPENJPA-2247) JoinColumn annotation is ignored
when mapping a unidirectional owned OneToOne that is in a SecondaryTable
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Lee reopened OPENJPA-2247:
---------------------------------
Assignee: Albert Lee (was: Rick Curtis)
Reopen the issue to address similar problem affecting the 1x1 bi and mx1 uni use case.
> 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: Albert Lee
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENJPA-2247) JoinColumn annotation is ignored
when mapping a unidirectional owned OneToOne that is in a SecondaryTable
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13463014#comment-13463014 ]
Albert Lee commented on OPENJPA-2247:
-------------------------------------
Fix committed under revision 1369042 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
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENJPA-2247) JoinColumn annotation is ignored
when mapping a unidirectional owned OneToOne that is in a SecondaryTable
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Lee updated OPENJPA-2247:
--------------------------------
Affects Version/s: (was: 2.2.0)
2.2.1
2.1.2
2.0.3
Fix Version/s: 2.2.1
2.1.2
2.0.3
> 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.0.3, 2.1.2, 2.3.0, 2.2.1
> Reporter: Rick Curtis
> Assignee: Albert Lee
> Fix For: 2.0.3, 2.1.2, 2.3.0, 2.2.1
>
>
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (OPENJPA-2247) JoinColumn annotation is ignored
when mapping a unidirectional owned OneToOne that is in a SecondaryTable
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Lee resolved OPENJPA-2247.
---------------------------------
Resolution: Fixed
> 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.0.3, 2.1.2, 2.3.0, 2.2.1
> Reporter: Rick Curtis
> Assignee: Albert Lee
> Fix For: 2.0.3, 2.1.2, 2.3.0, 2.2.1
>
> Attachments: OPENJPA-2247.20x.patch, OPENJPA-2247.21x.patch, OPENJPA-2247.22x.patch, OPENJPA-2247.trunk.patch
>
>
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (OPENJPA-2247) JoinColumn annotation is ignored
when mapping a unidirectional owned OneToOne that is in a SecondaryTable
Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Closed] (OPENJPA-2247) JoinColumn annotation is ignored
when mapping a unidirectional owned OneToOne that is in a SecondaryTable
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Lee closed OPENJPA-2247.
-------------------------------
> 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.0.3, 2.1.2, 2.3.0, 2.2.1
> Reporter: Rick Curtis
> Assignee: Albert Lee
> Fix For: 2.0.3, 2.1.2, 2.3.0, 2.2.1
>
> Attachments: OPENJPA-2247.20x.patch, OPENJPA-2247.21x.patch, OPENJPA-2247.22x.patch, OPENJPA-2247.trunk.patch
>
>
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENJPA-2247) JoinColumn annotation is ignored
when mapping a unidirectional owned OneToOne that is in a SecondaryTable
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Lee updated OPENJPA-2247:
--------------------------------
Attachment: OPENJPA-2247.trunk.patch
OPENJPA-2247.22x.patch
OPENJPA-2247.21x.patch
OPENJPA-2247.20x.patch
> 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.0.3, 2.1.2, 2.3.0, 2.2.1
> Reporter: Rick Curtis
> Assignee: Albert Lee
> Fix For: 2.0.3, 2.1.2, 2.3.0, 2.2.1
>
> Attachments: OPENJPA-2247.20x.patch, OPENJPA-2247.21x.patch, OPENJPA-2247.22x.patch, OPENJPA-2247.trunk.patch
>
>
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira