Kean Erickson (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-14134 (
https://hibernate.atlassian.net/browse/HHH-14134?atlOrigin=eyJpIjoiYjM4ZT...
)
Re: Querying with "IS NOT EMPTY" jpql against a @OneToMany mappedBy collection
is failing in mysql for Hibernate v. 5.4.11 and up (
https://hibernate.atlassian.net/browse/HHH-14134?atlOrigin=eyJpIjoiYjM4ZT...
)
It looks like extra parentheses are added to the select columns corresponding to an
“collection IS NOT EMPTY” check in JPQL, where the collection is a @OneToMany with
mappedBy. Mysql doesn’t like these added parens. The query originally in 5.4.10 came out
as
select * from a where not (exists (
select collection.a_id, collection.b_id from collection where a.id (
http://a.id ) = collection.a_id));
But in 5.4.11 it resolves to
select * from a where not (exists (
select (collection.a_id, collection.b_id) from collection where a.id (
http://a.id ) = collection.a_id));
(
https://hibernate.atlassian.net/browse/HHH-14134#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-14134#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#100140- sha1:33445dc )