mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-27 21:01:15 +08:00
Add test for enum startsWith
This commit is contained in:
parent
e99ba57543
commit
da0bbcd51b
@ -569,14 +569,14 @@ public abstract class AbstractJPATest {
|
||||
|
||||
@Test
|
||||
@NoBatooJPA
|
||||
public void Enum_in() {
|
||||
public void Enum_In() {
|
||||
assertEquals(1, query().from(company).where(company.ratingOrdinal.in(Rating.A, Rating.AA)).count());
|
||||
assertEquals(1, query().from(company).where(company.ratingString.in(Rating.A, Rating.AA)).count());
|
||||
}
|
||||
|
||||
@Test
|
||||
@NoBatooJPA
|
||||
public void Enum_In() {
|
||||
public void Enum_In2() {
|
||||
QEmployee employee = QEmployee.employee;
|
||||
|
||||
JPQLQuery query = query();
|
||||
@ -585,6 +585,11 @@ public abstract class AbstractJPATest {
|
||||
assertEquals(1l, query.count());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void Enum_StartsWith() {
|
||||
assertEquals(1, query().from(company).where(company.ratingString.stringValue().startsWith("A")).count());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void Exists() {
|
||||
assertTrue(query().from(cat).where(cat.kittens.any().name.eq("Ruth123")).exists());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user