use of com.querydsl.jpa.domain.sql.SAnimal 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);
}
use of com.querydsl.jpa.domain.sql.SAnimal in project querydsl by querydsl.
the class HibernateSQLBase method entityQueries_createQuery.
@Test
public void entityQueries_createQuery() {
SAnimal cat = new SAnimal("cat");
QCat catEntity = QCat.cat;
Query query = query().from(cat).select(catEntity).createQuery();
assertEquals(6, query.list().size());
}
use of com.querydsl.jpa.domain.sql.SAnimal in project querydsl by querydsl.
the class AbstractSQLTest method projections_duplicateColumns.
@Test
public void projections_duplicateColumns() {
SAnimal cat = new SAnimal("cat");
assertEquals(1, query().from(cat).select(Projections.list(cat.count(), cat.count())).fetch().size());
}
Aggregations