HHH-17201 Add test for issue

This commit is contained in:
Andrea Boriero 2023-09-13 12:14:20 +02:00 committed by Andrea Boriero
parent 3c625ead05
commit 8c1e3c3f14
1 changed files with 14 additions and 0 deletions

View File

@ -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<Integer> idList = List.of( 0, 1 );
session.byMultipleIds( SimpleEntity.class )
.enableOrderedReturn( false ).multiLoad( idList );
}
);
}
@Test
public void testBasicEntityOrderedLoad(SessionFactoryScope scope) {
scope.inTransaction(