Search in sources :

Example 1 with UuidTestEntity

use of io.crnk.jpa.model.UuidTestEntity in project crnk-framework by crnk-project.

the class BasicQueryTestBase method testUuidLikeFilter.

@Test
public void testUuidLikeFilter() {
    UUID id = UUID.fromString("805eda6f-fa43-3586-bcd3-0e22a0a8261d");
    UuidTestEntity entity = new UuidTestEntity();
    entity.setId(id);
    em.persist(entity);
    JpaQuery<UuidTestEntity> query = queryFactory.query(UuidTestEntity.class);
    assertEquals(1, query.addFilter("id", FilterOperator.LIKE, "805%").buildExecutor().getResultList().size());
}
Also used : UuidTestEntity(io.crnk.jpa.model.UuidTestEntity) Test(org.junit.Test)

Aggregations

UuidTestEntity (io.crnk.jpa.model.UuidTestEntity)1 Test (org.junit.Test)1