Tassilo Karge (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5f50ce4...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMjI2YWI3NzE5...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16512?atlOrigin=eyJpIjoiMjI2YW...
) HHH-16512 (
https://hibernate.atlassian.net/browse/HHH-16512?atlOrigin=eyJpIjoiMjI2YW...
) Bidirectional OneToOne association produces wrong isNull predicate in criteria query (
https://hibernate.atlassian.net/browse/HHH-16512?atlOrigin=eyJpIjoiMjI2YW...
)
Issue Type: Bug Affects Versions: 5.6.15 Assignee: Unassigned Components: hibernate-core,
query-criteria, query-hql Created: 25/Apr/2023 02:52 AM Priority: Critical Reporter:
Tassilo Karge (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5f50ce4...
)
Setup: Two classes A, B declaring a bidirectional OneToOne relation to one another
(attributes A.b, B.a), class A declares relation with a join column (named B ) and class B
declares relation as mappedBy b.
A query that checks isNull('a') on B (alias b0) produces the where-clause b0.id is
null instead of joining with A (alias a0, join criterion a0.b = b0.id ) and querying a0.id
is null.
When writing a query that checks isNull(A_.b), everything is fine.
(
https://hibernate.atlassian.net/browse/HHH-16512#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16512#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#100223- sha1:cdc0af3 )