mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-06 21:05:50 +08:00
#220 added group by test
This commit is contained in:
parent
51549b85b4
commit
348f915ad3
@ -899,7 +899,7 @@ public abstract class AbstractStandardTest {
|
||||
assertTrue(strings.contains("a"));
|
||||
assertTrue(strings.contains("b"));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@ExcludeIn(MYSQL)
|
||||
public void GroupBy() {
|
||||
@ -933,4 +933,16 @@ public abstract class AbstractStandardTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void GroupBy2() {
|
||||
// select cat0_.name as col_0_0_, cat0_.breed as col_1_0_, sum(cat0_.bodyWeight) as col_2_0_
|
||||
// from animal_ cat0_ where cat0_.DTYPE in ('C', 'DC') and cat0_.bodyWeight>?
|
||||
// group by cat0_.name , cat0_.breed
|
||||
query().from(cat)
|
||||
.where(cat.bodyWeight.gt(0))
|
||||
.groupBy(cat.name, cat.breed)
|
||||
.list(cat.name, cat.breed, cat.bodyWeight.sum());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user