Scott Marlow ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *created* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYzRjMjAzYWYx... ) / Improvement ( https://hibernate.atlassian.net/browse/HHH-16276?atlOrigin=eyJpIjoiYzRjMj... ) HHH-16276 ( https://hibernate.atlassian.net/browse/HHH-16276?atlOrigin=eyJpIjoiYzRjMj... ) OrderingExpression (ColumnReference) should be made readable when added to thrown Exception ( https://hibernate.atlassian.net/browse/HHH-16276?atlOrigin=eyJpIjoiYzRjMj... )
Issue Type: Improvement Affects Versions: 6.2.0.CR3 Assignee: Unassigned Created: 09/Mar/2023 06:44 AM Fix Versions: 6.2.0 Priority: Major Reporter: Scott Marlow ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... )
git clone https://github.com/scottmarlow/orm-bootstrap-benchmarks ( https://github.com/scottmarlow/orm-bootstrap-benchmarks )
cd orm-bootstrap-benchmarks
git fetch --all
git checkout orm6.2
switch to jdk11
mvn clean install
cd ..
git clone https://github.com/wildfly/wildfly/ ( https://github.com/wildfly/wildfly/ )
cd wildfly
./build.sh clean install -DskipTests=true
cd dist/target/wildfly-28.0.0.Beta1-SNAPSHOT
cp ../../../../orm-bootstrap-benchmarks/target/orm-boostrap-0.0.1.jar standalone/deployment
cd bin
to debug, update standalone.conf and add or uncomment line with JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=y"
./standalone.sh
You should see the following exception:
Caused by: org.hibernate.metamodel.mapping.ordering.ast.OrderByComplianceViolation: `@OrderBy` expression (Line) resolved to `org.hibernate.metamodel.mapping.ordering.ast.ColumnReference@1e3f672f` which is not a domain-model reference which violates the JPA specification
at org.hibernate@6.2.0-SNAPSHOT//org.hibernate.metamodel.mapping.ordering.ast.ParseTreeVisitor.visitSortSpecification(ParseTreeVisitor.java:71)
at org.hibernate@6.2.0-SNAPSHOT//org.hibernate.metamodel.mapping.ordering.ast.ParseTreeVisitor.visitOrderByFragment(ParseTreeVisitor.java:47)
at org.hibernate@6.2.0-SNAPSHOT//org.hibernate.metamodel.mapping.ordering.OrderByFragmentTranslator.translate(OrderByFragmentTranslator.java:60)
at org.hibernate@6.2.0-SNAPSHOT//org.hibernate.metamodel.mapping.internal.PluralAttributeMappingImpl.finishInitialization(PluralAttributeMappingImpl.java:235)
at org.hibernate@6.2.0-SNAPSHOT//org.hibernate.metamodel.mapping.internal.MappingModelCreationHelper.lambda$buildPluralAttributeMapping$2(MappingModelCreationHelper.java:647)
at org.hibernate@6.2.0-SNAPSHOT//org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess$PostInitCallbackEntry.process(MappingModelCreationProcess.java:246)
at org.hibernate@6.2.0-SNAPSHOT//org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess.executePostInitCallbacks(MappingModelCreationProcess.java:106)
at org.hibernate@6.2.0-SNAPSHOT//org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess.execute(MappingModelCreationProcess.java:88)
at org.hibernate@6.2.0-SNAPSHOT//org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess.process(MappingModelCreationProcess.java:40)
at org.hibernate@6.2.0-SNAPSHOT//org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl.finishInitialization(MappingMetamodelImpl.java:201)
at org.hibernate(a)6.2.0-SNAPSHOT//org.hibernate.internal.SessionFactoryImpl$1.<init>(SessionFactoryImpl.java:275)
at org.hibernate(a)6.2.0-SNAPSHOT//org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:268)
at org.hibernate@6.2.0-SNAPSHOT//org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:431)
at org.hibernate@6.2.0-SNAPSHOT//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1455)
... 12 more
( https://hibernate.atlassian.net/browse/HHH-16276#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-16276#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#100217- sha1:e5bf00f )