[hibernate-issues] [JIRA] (HHH-14011) JoinTable referencedColumn in base class is not recognized
Christian Beikov (JIRA)
jira at hibernate.atlassian.net
Mon May 11 09:10:03 EDT 2020
Christian Beikov ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A0222998d-a0c8-4789-91ec-6a92d10dfb9a ) *created* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYzgxZmZmMGNjODE3NDUxZjlkODdkN2ZmYjQ1MTM5Y2UiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14011?atlOrigin=eyJpIjoiYzgxZmZmMGNjODE3NDUxZjlkODdkN2ZmYjQ1MTM5Y2UiLCJwIjoiaiJ9 ) HHH-14011 ( https://hibernate.atlassian.net/browse/HHH-14011?atlOrigin=eyJpIjoiYzgxZmZmMGNjODE3NDUxZjlkODdkN2ZmYjQ1MTM5Y2UiLCJwIjoiaiJ9 ) JoinTable referencedColumn in base class is not recognized ( https://hibernate.atlassian.net/browse/HHH-14011?atlOrigin=eyJpIjoiYzgxZmZmMGNjODE3NDUxZjlkODdkN2ZmYjQ1MTM5Y2UiLCJwIjoiaiJ9 )
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%3A0222998d-a0c8-4789-91ec-6a92d10dfb9a )
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=eyJpIjoiYzgxZmZmMGNjODE3NDUxZjlkODdkN2ZmYjQ1MTM5Y2UiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14011#add-comment?atlOrigin=eyJpIjoiYzgxZmZmMGNjODE3NDUxZjlkODdkN2ZmYjQ1MTM5Y2UiLCJwIjoiaiJ9 )
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.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100126- sha1:454696e )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200511/f89910dc/attachment.html
More information about the hibernate-issues
mailing list