forked from eclipse-ee4j/eclipselink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 561664: JoinColumn with same name and referencedColumnName throws…
… exception Signed-off-by: Will Dazey <[email protected]>
- Loading branch information
Showing
5 changed files
with
149 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...clipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/mapping/model/BaseChild.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2020 IBM Corporation. All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, | ||
* or the Eclipse Distribution License v. 1.0 which is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
*/ | ||
|
||
// Contributors: | ||
// 04/17/2020 - Will Dazey | ||
// - 561664: JoinColumn with same name as referencedColumnName | ||
package org.eclipse.persistence.jpa.test.mapping.model; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Embedded; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Id; | ||
import javax.persistence.Table; | ||
|
||
@Entity | ||
@Table(name = "BASE_CHILD") | ||
public class BaseChild { | ||
|
||
@Id | ||
@Column(name = "BASE_CHILD_ID") | ||
private Long id; | ||
|
||
@Embedded | ||
private BaseEmbeddable parentRef; | ||
} |
29 changes: 29 additions & 0 deletions
29
...elink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/mapping/model/BaseEmbeddable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2020 IBM Corporation. All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, | ||
* or the Eclipse Distribution License v. 1.0 which is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
*/ | ||
|
||
// Contributors: | ||
// 04/17/2020 - Will Dazey | ||
// - 561664: JoinColumn with same name as referencedColumnName | ||
package org.eclipse.persistence.jpa.test.mapping.model; | ||
|
||
import javax.persistence.Embeddable; | ||
|
||
@Embeddable | ||
public class BaseEmbeddable { | ||
|
||
@javax.persistence.ManyToOne | ||
@javax.persistence.JoinColumn( | ||
name = "BASE_PARENT_ID", | ||
referencedColumnName = "BASE_PARENT_ID") | ||
private BaseParent parent; | ||
} |
31 changes: 31 additions & 0 deletions
31
...lipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/mapping/model/BaseParent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2020 IBM Corporation. All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, | ||
* or the Eclipse Distribution License v. 1.0 which is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
*/ | ||
|
||
// Contributors: | ||
// 04/17/2020 - Will Dazey | ||
// - 561664: JoinColumn with same name as referencedColumnName | ||
package org.eclipse.persistence.jpa.test.mapping.model; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Id; | ||
import javax.persistence.Table; | ||
|
||
@Entity | ||
@Table(name = "BASE_PARENT") | ||
public class BaseParent { | ||
|
||
@Id | ||
@Column(name = "BASE_PARENT_ID") | ||
private Long id; | ||
} |