Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYzgxZmZmMGNj...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-14011?atlOrigin=eyJpIjoiYzgxZm...
) HHH-14011 (
https://hibernate.atlassian.net/browse/HHH-14011?atlOrigin=eyJpIjoiYzgxZm...
) JoinTable referencedColumn in base class is not recognized (
https://hibernate.atlassian.net/browse/HHH-14011?atlOrigin=eyJpIjoiYzgxZm...
)
Issue Type: Bug Assignee: Unassigned Attachments: HHH-4233.zip Components: hibernate-core
Created: 11/May/2020 06:10 AM Priority: Major Reporter: Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
The problematic model looks like this:
@Entity
@Table(name = "base_object" )
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn
public abstract class BaseObject implements Serializable {
@Id
@Column(name = "id" )
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
@Column(name = "name" , nullable = false , unique = true )
private String name;
@Column(name = "ukey" , unique = true )
private String key;
}
@Entity
public class SmallObject extends BaseObject {
@Column(name = "second_name" , nullable = false )
private String secondName;
}
@Entity
public class BigObject extends BaseObject {
@Column(name = "second_name" , nullable = false )
private String secondName;
@ManyToMany
@JoinTable(
name = "small_object_assignment" ,
joinColumns = @JoinColumn(name = "ukey1" , referencedColumnName =
"ukey" ),
inverseJoinColumns = @JoinColumn(name = "ukey2" ,
referencedColumnName = "ukey" )
)
private List<SmallObject> objects;
}
Here is the reproducer HHH-4233.zip (
https://hibernate.atlassian.net/secure/attachment/49679/49679_HHH-4233.zip )
(
https://hibernate.atlassian.net/browse/HHH-14011#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-14011#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100126- sha1:454696e )