Skip to content

Commit 438db8f

Browse files
committed
HHH-17201 Add test for issue
1 parent add1ffa commit 438db8f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/loading/multiLoad/MultiIdEntityLoadTests.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
import org.hibernate.testing.orm.domain.StandardDomainModel;
1313
import org.hibernate.testing.orm.domain.gambit.BasicEntity;
1414
import org.hibernate.testing.orm.domain.gambit.EntityWithAggregateId;
15+
import org.hibernate.testing.orm.domain.gambit.SimpleEntity;
1516
import org.hibernate.testing.orm.junit.DomainModel;
17+
import org.hibernate.testing.orm.junit.JiraKey;
1618
import org.hibernate.testing.orm.junit.SessionFactory;
1719
import org.hibernate.testing.orm.junit.SessionFactoryFunctionalTesting;
1820
import org.hibernate.testing.orm.junit.SessionFactoryScope;
@@ -44,6 +46,18 @@ public void testBasicEntitySimpleLoad(SessionFactoryScope scope) {
4446
);
4547
}
4648

49+
@Test
50+
@JiraKey( "HHH-17201" )
51+
public void testSimpleEntityUnOrderedMultiLoad(SessionFactoryScope scope) {
52+
scope.inTransaction(
53+
session -> {
54+
List<Integer> idList = List.of( 0, 1 );
55+
session.byMultipleIds( SimpleEntity.class )
56+
.enableOrderedReturn( false ).multiLoad( idList );
57+
}
58+
);
59+
}
60+
4761
@Test
4862
public void testBasicEntityOrderedLoad(SessionFactoryScope scope) {
4963
scope.inTransaction(

0 commit comments

Comments
 (0)