@Test public void clone_() { QCat cat = QCat.cat; BooleanBuilder emptyBooleanBuilder = new BooleanBuilder(); HibernateQuery<?> hq = new HibernateQuery<Void>().from(cat).where(cat.name.isNull().and(emptyBooleanBuilder)); HibernateQuery<?> hq2 = hq.clone(); assertNotNull(hq2); }
@Test public void innerJoin() { HibernateQuery<?> hqlQuery = new HibernateQuery<Void>(); QEmployee employee = QEmployee.employee; hqlQuery.from(employee); hqlQuery.innerJoin(employee.user, QUser.user); assertEquals( "select employee\nfrom Employee employee\n inner join employee.user as user", hqlQuery.toString()); }