mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
improved subquery tests
This commit is contained in:
parent
12a80408cf
commit
b7901f2fb7
@ -56,5 +56,12 @@ public class SubQueryTest extends AbstractQueryTest{
|
||||
assertToString("exists (select 1 from Cat cat where cat.weight < :a1)", sub().from(cat).where(cat.weight.lt(1)).exists());
|
||||
assertToString("exists (select 1 from Cat cat where cat.weight < :a1)", sub().from(cat).where(cat.weight.lt(1)).unique(cat).exists());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void NotExists(){
|
||||
assertToString("not exists (select 1 from Cat cat)", sub().from(cat).notExists());
|
||||
assertToString("not exists (select 1 from Cat cat where cat.weight < :a1)", sub().from(cat).where(cat.weight.lt(1)).notExists());
|
||||
assertToString("not exists (select 1 from Cat cat where cat.weight < :a1)", sub().from(cat).where(cat.weight.lt(1)).unique(cat).notExists());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user