Søren Jepsen (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ca1c89...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMzQyZDA2NWI5...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15622?atlOrigin=eyJpIjoiMzQyZD...
) HHH-15622 (
https://hibernate.atlassian.net/browse/HHH-15622?atlOrigin=eyJpIjoiMzQyZD...
) Query bug in @NamedEntityGraph when doing Eager loading of @OneToOne mappings in Single
Table inheritance (
https://hibernate.atlassian.net/browse/HHH-15622?atlOrigin=eyJpIjoiMzQyZD...
)
Change By: Søren Jepsen (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ca1c89...
)
There appears to be a bug in [*@NamedEntityGraph*|https://github.com/entitygraph] when
trying to eager load a [*@OnetoOne*|https://github.com/OnetoOne] mapping with
[*@Mapsid*|https://github.com/mapsid] in a Single Table inheritance setup.
When doing eager loading, I get the following error:
{{Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: uuid =
character varying Hint: No operator matches the given name and argument types. You might
need to add explicit type casts.}}
Generated sql:
'select
p1_0.id,d1_0.parent_id,d1_0.dtype,d1_0.organization_id,d1_0.module_width,p1_0.organization_id
from physical_aspect p1_0 left join physical_aspect_definition d1_0 on
_p1_0.id=d1_0.dtype_ where p1_0.organization_id=?'
Seems like trying to compare id=dtype (discriminator column).
The bug appears in Hibernate 6.1. 3 4 and previous versions og of 6.
The [@NamedEntityGraph|https://github.com/entitygraph] feature is tested working with
Hibernate 5.6.11
I've included a testcase for both 6.1.4 and 5.6.11
([
https://github.com/s-jepsen/hibernate-test-case-templates|https://github....])
(
https://hibernate.atlassian.net/browse/HHH-15622#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15622#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#100209- sha1:392b984 )