Wilber Saca (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMjQzMWQ3NjBh...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15612?atlOrigin=eyJpIjoiMjQzMW...
) HHH-15612 (
https://hibernate.atlassian.net/browse/HHH-15612?atlOrigin=eyJpIjoiMjQzMW...
) Error entity graph with on clause on query (
https://hibernate.atlassian.net/browse/HHH-15612?atlOrigin=eyJpIjoiMjQzMW...
)
Issue Type: Bug Affects Versions: 6.1.4 Assignee: Unassigned Components: hibernate-core
Created: 18/Oct/2022 08:57 AM Environment: Hibernate: 6.1.4
JVM: JDK 17
OS: Windows
DB: Oracle Priority: Critical Reporter: Wilber Saca (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Hi, I’m just testing hibernate 6 because I’m planning the migration, but I found some
errors related to the use of entity graphs, this case was working with hibernate 5.x and
I’m reporting it because I didn’t find if non compatible changes were introduced.
When I create a subgraph on an attribute with the ON clause, the SQL join is duplicated,
in the next example the table orderPosition is duplicated.
select distinct c1_0.id,
c1_0.orderDate,
o2_0.customerOrder,
o2_0.id,
o2_0.amount,
o2_0.deleted,
p1_0.id,
p1_0.productName,
s1_0.id,
s1_0.city
from
customerOrder c1_0
left join
orderPosition o1_0
on c1_0.id=o1_0.customerOrder
and o1_0.deleted= false
left join
orderPosition o2_0
on c1_0.id=o2_0.customerOrder
left join
product p1_0
on p1_0.id=o2_0.product
left join
address s1_0
on s1_0.id=c1_0.shippingAddress_id
I modified the class EntityGraphUsingFetchGraphTest.java to create a new test case to show
you the problem:
*
https://github.com/wsaca/hibernate-orm/blob/error-entity-graph-on-clause/...
(
https://github.com/wsaca/hibernate-orm/blob/error-entity-graph-on-clause/...
)
I also have an issue where Criteria API ignores a custom Converter that I’m using to
convert VARCHAR to Boolean using spanish characters. With JPQL the same converter is
working. Should I create a new issue?
(
https://hibernate.atlassian.net/browse/HHH-15612#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15612#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:597f6a7 )