Gdy tworze Query w JPQL:
Select A.id, A.name, A.lastname, Count(B.a) from B b join A a where... group by ( A.id, A.name, A.lastname);
to jest wszystko ok, ale dlaczego nie moge zrobic po prostu tak:
Select A, Count(B.a) from B b join A a where... group by ( A.id);
aby odebrać cały obiekt A, a nie poszczegolne elementy, jak to osiagnac ?