[hibernate-issues] [JIRA] (HHH-12645) HQL left join fetch not working in inheritance scenario: org.hibernate.QueryException: could not resolve property

Sai Surekha (JIRA) jira at hibernate.atlassian.net
Fri Apr 17 01:15:16 EDT 2020


Sai Surekha ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5e9939601086270c149ab432 ) *commented* on HHH-12645 ( https://hibernate.atlassian.net/browse/HHH-12645?atlOrigin=eyJpIjoiODM1OGM3OWI5ZmRhNDlkZTg0YTBhZTZhMmNkMDg3ZTkiLCJwIjoiaiJ9 )

Re: HQL left join fetch not working in inheritance scenario: org.hibernate.QueryException: could not resolve property ( https://hibernate.atlassian.net/browse/HHH-12645?atlOrigin=eyJpIjoiODM1OGM3OWI5ZmRhNDlkZTg0YTBhZTZhMmNkMDg3ZTkiLCJwIjoiaiJ9 )

Hi All,

I am upgrading hibernate from 5.1.17 to 5.4.11. I am also facing same issue and scenario is also same. I can not go for rename because it effects lot of files.

@Entity
public class BaseEntity

{ @Id private long id; }

Child1:

@Entity
public class EntityA extends BaseEntity

{ @OneToMany(mappedBy = "entityA") private Set<EntityC> attributes; }

Child2:

@Entity
public class EntityB extends BaseEntity

{ @OneToMany(mappedBy = "entityB") private Set<EntityC> attributes; }

@Entity
public class EntityC

{ @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "entityA_id") @NaturalId private EntityA entityA; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "entityB_id") @NaturalId @XmlTransient @JsonProperty private EntityB entityB; }

Can some one suggest solution for this?

( https://hibernate.atlassian.net/browse/HHH-12645#add-comment?atlOrigin=eyJpIjoiODM1OGM3OWI5ZmRhNDlkZTg0YTBhZTZhMmNkMDg3ZTkiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-12645#add-comment?atlOrigin=eyJpIjoiODM1OGM3OWI5ZmRhNDlkZTg0YTBhZTZhMmNkMDg3ZTkiLCJwIjoiaiJ9 )

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#100124- sha1:93e2dd3 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200417/c86fb58d/attachment.html 


More information about the hibernate-issues mailing list