From 287808a914b33cc91370d114b264a6aac2463400 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Thu, 12 Dec 2019 18:24:36 -0600 Subject: [PATCH] HHH-13778: `@OrderBy` handling using SQL AST - fixed test --- .../mapping/collections/PluralAttributeMappingTests.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/collections/PluralAttributeMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/collections/PluralAttributeMappingTests.java index c94ed741a0..6ca30d592f 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/collections/PluralAttributeMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/collections/PluralAttributeMappingTests.java @@ -98,7 +98,7 @@ public class PluralAttributeMappingTests { final EntityMappingType containerEntityDescriptor = domainModel.getEntityDescriptor( EntityOfMaps.class ); // 8 for now, until entity-valued map keys is supported - assertThat( containerEntityDescriptor.getNumberOfAttributeMappings(), is( 9 ) ); + assertThat( containerEntityDescriptor.getNumberOfAttributeMappings(), is( 10 ) ); final PluralAttributeMapping basicByBasic = (PluralAttributeMapping) containerEntityDescriptor.findAttributeMapping( "basicByBasic" ); assertThat( basicByBasic, notNullValue() ); @@ -139,6 +139,12 @@ public class PluralAttributeMappingTests { assertThat( manyToManyByBasic, notNullValue() ); assertThat( manyToManyByBasic.getKeyDescriptor(), notNullValue() ); assertThat( manyToManyByBasic.getElementDescriptor(), notNullValue() ); + + final PluralAttributeMapping componentByBasicOrdered = (PluralAttributeMapping) containerEntityDescriptor.findAttributeMapping( "componentByBasicOrdered" ); + assertThat( componentByBasicOrdered, notNullValue() ); + assertThat( componentByBasicOrdered.getKeyDescriptor(), notNullValue() ); + assertThat( componentByBasicOrdered.getElementDescriptor(), notNullValue() ); + assertThat( componentByBasicOrdered.getOrderByFragment(), notNullValue() ); } }