Closed easybest closed 2 years ago
Supports criteria query, such as:
@Test void testCriteria() { this.flushTestUsers(); assertThat(this.repository.findAll( CriteriaQuery.lambda(User.class).eq(User::getFirstname, "Oliver").eq(User::getLastname, "Gierke"))) .containsOnly(this.firstUser); assertThat(this.repository.findAll(CriteriaQuery.create(User.class).eq("firstname", "Oliver") .custom("firstname like ?1", "old1").or().eq("lastname", "Gierke").or().eq("lastname", "DDD") .or(c -> c.eq("lastname", "XXX").ne("firstname", "CCC")))).containsOnly(this.firstUser); }
Supports criteria query, such as: