HHH-17415 Add test for issue
This commit is contained in:
parent
4e3c66ecdb
commit
397c730c69
|
@ -153,6 +153,25 @@ public class EntityValuedPathsGroupByOrderByTest {
|
|||
).getSingleResult().get( 1 ) ).isEqualTo( 3L ) );
|
||||
}
|
||||
|
||||
@Test
|
||||
@Jira( "https://hibernate.atlassian.net/browse/HHH-17415" )
|
||||
public void testInSubqueryGroupBy(SessionFactoryScope scope) {
|
||||
scope.inTransaction( session -> assertThat( session.createQuery(
|
||||
"select a from EntityA a where a.secondary in (select b2 from EntityB b2 group by b2)",
|
||||
Tuple.class
|
||||
).getResultList() ).hasSize( 2 ) );
|
||||
}
|
||||
|
||||
@Test
|
||||
@Jira( "https://hibernate.atlassian.net/browse/HHH-17415" )
|
||||
public void testInSubqueryGroupByImplicitJoin(SessionFactoryScope scope) {
|
||||
scope.inTransaction( session -> assertThat( session.createQuery(
|
||||
"select a from EntityA a where a.secondary in" +
|
||||
" (select a2.secondary from EntityA a2 group by a2.secondary)",
|
||||
Tuple.class
|
||||
).getResultList() ).hasSize( 2 ) );
|
||||
}
|
||||
|
||||
@Entity( name = "EntityA" )
|
||||
public static class EntityA {
|
||||
@Id
|
||||
|
|
Loading…
Reference in New Issue