// WHERE d.deptno = 1
CriteriaQuery<Department> q = cb.createQuery(Department.class);
Root<Department> d = q.from(Department.class);
d.fetch(Department_.employees, JoinType.LEFT);
d.fetch(Department_.employee2s, JoinType.LEFT);
q.where(cb.equal(d.get(Department_.deptno), 20)).select(d).distinct(true);
List<Department> ds = em.createQuery(q).getResultList();
System.out.println("-- testCriteriaAPITwoFetch -----");
em.clear();
Assert.assertEquals(1, ds.size());