File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
hibernate-core/src/test/java/org/hibernate/orm/test/query Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,25 @@ public void testImplicitJoinSelectAndGroupByAndOrderBy(SessionFactoryScope scope
153
153
).getSingleResult ().get ( 1 ) ).isEqualTo ( 3L ) );
154
154
}
155
155
156
+ @ Test
157
+ @ Jira ( "https://hibernate.atlassian.net/browse/HHH-17415" )
158
+ public void testInSubqueryGroupBy (SessionFactoryScope scope ) {
159
+ scope .inTransaction ( session -> assertThat ( session .createQuery (
160
+ "select a from EntityA a where a.secondary in (select b2 from EntityB b2 group by b2)" ,
161
+ Tuple .class
162
+ ).getResultList () ).hasSize ( 2 ) );
163
+ }
164
+
165
+ @ Test
166
+ @ Jira ( "https://hibernate.atlassian.net/browse/HHH-17415" )
167
+ public void testInSubqueryGroupByImplicitJoin (SessionFactoryScope scope ) {
168
+ scope .inTransaction ( session -> assertThat ( session .createQuery (
169
+ "select a from EntityA a where a.secondary in" +
170
+ " (select a2.secondary from EntityA a2 group by a2.secondary)" ,
171
+ Tuple .class
172
+ ).getResultList () ).hasSize ( 2 ) );
173
+ }
174
+
156
175
@ Entity ( name = "EntityA" )
157
176
public static class EntityA {
158
177
@ Id
You can’t perform that action at this time.
0 commit comments