Search in sources :

Example 6 with QueryMutability

use of com.querydsl.core.QueryMutability in project querydsl by querydsl.

the class JPAQueryMutabilityTest method test.

@Test
public void test() throws SecurityException, IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, IOException {
    entityManager.persist(new Cat("Beck", 1));
    entityManager.flush();
    SAnimal cat = new SAnimal("cat");
    JPASQLQuery<?> query = query().from(cat);
    new QueryMutability(query).test(cat.id, cat.name);
}
Also used : SAnimal(com.querydsl.jpa.domain.sql.SAnimal) QueryMutability(com.querydsl.core.QueryMutability) Cat(com.querydsl.jpa.domain.Cat) Test(org.junit.Test)

Aggregations

QueryMutability (com.querydsl.core.QueryMutability)6 Test (org.junit.Test)6 SAnimal (com.querydsl.jpa.domain.sql.SAnimal)2 QProduct (com.querydsl.jdo.test.domain.QProduct)1 Cat (com.querydsl.jpa.domain.Cat)1 QCat (com.querydsl.jpa.domain.QCat)1 Ignore (org.junit.Ignore)1