diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/loading/multiLoad/MultiIdEntityLoadTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/loading/multiLoad/MultiIdEntityLoadTests.java index 9385d89b48..51cf57e975 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/loading/multiLoad/MultiIdEntityLoadTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/loading/multiLoad/MultiIdEntityLoadTests.java @@ -12,7 +12,9 @@ import org.hibernate.testing.hamcrest.CollectionMatchers; import org.hibernate.testing.orm.domain.StandardDomainModel; import org.hibernate.testing.orm.domain.gambit.BasicEntity; import org.hibernate.testing.orm.domain.gambit.EntityWithAggregateId; +import org.hibernate.testing.orm.domain.gambit.SimpleEntity; import org.hibernate.testing.orm.junit.DomainModel; +import org.hibernate.testing.orm.junit.JiraKey; import org.hibernate.testing.orm.junit.SessionFactory; import org.hibernate.testing.orm.junit.SessionFactoryFunctionalTesting; import org.hibernate.testing.orm.junit.SessionFactoryScope; @@ -44,6 +46,18 @@ public class MultiIdEntityLoadTests { ); } + @Test + @JiraKey( "HHH-17201" ) + public void testSimpleEntityUnOrderedMultiLoad(SessionFactoryScope scope) { + scope.inTransaction( + session -> { + List idList = List.of( 0, 1 ); + session.byMultipleIds( SimpleEntity.class ) + .enableOrderedReturn( false ).multiLoad( idList ); + } + ); + } + @Test public void testBasicEntityOrderedLoad(SessionFactoryScope scope) { scope.inTransaction(