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 and previous versions og 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.34 and 5.6.11 ([https://github. com/s-> See EagerLoadingEntityGraphTest#testEagerloadingByNamedEntityGraphAnnotationFails(jepsen/hibernate-test-case-templates|https://github.com/s-jepsen/hibernate-test-case-templates|smart-link]) |
|