[JIRA] (HHH-15612) Error entity graph with on clause on query
by Wilber Saca (JIRA)
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=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100209- sha1:597f6a7 )
2 years, 2 months
[JIRA] (HHH-15597) Unable to enhance class with Hibernate 6 Gradle plugin
by Steve Ebersole (JIRA)
Steve Ebersole ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *commented* on HHH-15597 ( https://hibernate.atlassian.net/browse/HHH-15597?atlOrigin=eyJpIjoiMDViMG... )
Re: Unable to enhance class with Hibernate 6 Gradle plugin ( https://hibernate.atlassian.net/browse/HHH-15597?atlOrigin=eyJpIjoiMDViMG... )
Not able to use the sample project:
* What went wrong:
A problem occurred configuring root project 'data-jpa'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.0-SNAPSHOT.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.0-SNAPSHOT:20221018.140804-920
> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.0-SNAPSHOT:20221018.140804-920 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5' but:
- Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0-SNAPSHOT declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0-SNAPSHOT declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.0-SNAPSHOT declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.0-SNAPSHOT declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0-SNAPSHOT declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0-SNAPSHOT declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
( https://hibernate.atlassian.net/browse/HHH-15597#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-15597#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=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100209- sha1:597f6a7 )
2 years, 2 months