Marco Belladelli (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=637b480...
) *commented* on HHH-16266 (
https://hibernate.atlassian.net/browse/HHH-16266?atlOrigin=eyJpIjoiNDAxZT...
)
Re: Error when using @Query with EmbeddedId after upgrading to Spring Boot 3.0.4 (
https://hibernate.atlassian.net/browse/HHH-16266?atlOrigin=eyJpIjoiNDAxZT...
)
Hello karthik (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6331f78...
) , the error you’re getting should be pretty slef-explanatory:
Multiple from-elements expose unqualified attribute : id
This refers to the where clause in your subquery: WHERE id.queryId = u2.queryId AND
id.userId=?1 , id here is unqualified and available in multiple tables because it could be
referring to the root query entities too.
To solve your problem you just have to qualify the id attribute, e.g. from QueryUser qu
WHERE qu.id.queryId = u2.queryId AND qu.id.userId=?1.
(
https://hibernate.atlassian.net/browse/HHH-16266#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16266#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#100218- sha1:518c67a )