I want to run a sql:
select b.* from A a inner join B b on a.c = b.c where b.status = 1 ;
now I have to do this use Jpa CriteriaQuery, and I hava got ( Root<A> root
), A and B has no PK & FK, columu c is the FK of A and B, so how to do?
CriteriaQuery aQuery= cb.createQuery(A.class);
Root<A> aRoot = aQuery.from(A.class);
then how to do ?