[hibernate-issues] [JIRA] (HHH-14134) Querying with "IS NOT EMPTY" jpql against a @OneToMany mappedBy collection is failing in mysql for Hibernate v. 5.4.11 and up

Kean Erickson (JIRA) jira at hibernate.atlassian.net
Sat Aug 1 01:31:11 EDT 2020


Kean Erickson ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A3afe9d63-4a56-40b5-be3e-001c223765a9 ) *created* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiM2Y3ZWYxYzY0YjhjNDc4OTkwYmYwZDFlMGE5ZTJlODIiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14134?atlOrigin=eyJpIjoiM2Y3ZWYxYzY0YjhjNDc4OTkwYmYwZDFlMGE5ZTJlODIiLCJwIjoiaiJ9 ) HHH-14134 ( https://hibernate.atlassian.net/browse/HHH-14134?atlOrigin=eyJpIjoiM2Y3ZWYxYzY0YjhjNDc4OTkwYmYwZDFlMGE5ZTJlODIiLCJwIjoiaiJ9 ) 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=eyJpIjoiM2Y3ZWYxYzY0YjhjNDc4OTkwYmYwZDFlMGE5ZTJlODIiLCJwIjoiaiJ9 )

Issue Type: Bug Affects Versions: 5.4.11 Assignee: Unassigned Attachments: MysqlEmptyTest.java, Stuff.java, Thing.java, setup.sql Components: hibernate-core Created: 31/Jul/2020 22:31 PM Priority: Minor Reporter: Kean Erickson ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A3afe9d63-4a56-40b5-be3e-001c223765a9 )

Please see attached test files.

In the attached files, A Stuff has multiple Things. Each of the Things has a parental reference to their Stuff.
The test attempts to do an IS EMPTY check in JPQL against the stuff's @OneToMany mappedBy collection of things. This is the resulting error:

Jul 31, 2020 10:21:33 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARNING: SQL Error: 1241, SQLState: 21000
Jul 31, 2020 10:21:33 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
SEVERE: Operand should contain 1 column(s)

Tested against mysql Ver 14.14 Distrib 5.6.38, for Win64 (x86_64)

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

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#100140- sha1:33445dc )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200801/a5faf675/attachment.html 


More information about the hibernate-issues mailing list