Danilov Roman (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiOTc3MzJhZThl...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16362?atlOrigin=eyJpIjoiOTc3Mz...
) HHH-16362 (
https://hibernate.atlassian.net/browse/HHH-16362?atlOrigin=eyJpIjoiOTc3Mz...
) H5->H6: JOIN FETCH errors (
https://hibernate.atlassian.net/browse/HHH-16362?atlOrigin=eyJpIjoiOTc3Mz...
)
Issue Type: Bug Affects Versions: 6.2.0.CR4 Assignee: Unassigned Attachments:
hibernate-orm-6.zip Components: hibernate-core Created: 23/Mar/2023 04:43 AM Priority:
Major Reporter: Danilov Roman (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
)
Hello.
In Hibernate 6.2.0.CR4.
I have some entities:
public class ImageLog {
@ManyToOne
@JoinColumn(name = "lateral_id", nullable = false)
public Lateral lateral;
}
public class Lateral {
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "project_uuid", nullable = false, updatable = false)
public Project project;
}
public class Project {
@ManyToOne(fetch = FetchType.EAGER)
@Column(name = "company_id", insertable = false, updatable = false)
public Company company;
}
And repository query:
@Query("SELECT ilog.lateral.project FROM ImageLog ilog JOIN FETCH
ilog.lateral.project.company WHERE ilog.uuid = ?1")
Optional<Project> findParentProject(UUID logUuid);
And the error appears:
org.hibernate.query.SemanticException: query specified join fetching, but the owner of the
fetched association was not present in the select list
[SqmSingularJoin(com.repository.project.imagelog.entity.ImageLog(ilog).lateral :
lateral)]
Is it a bug?
(
https://hibernate.atlassian.net/browse/HHH-16362#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16362#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#100219- sha1:0c2c9f2 )