1
Running this query directly in SQL works
SELECT T2.id, T2.name, T2.description, T2.version, T2.img_thumb, T2.interval, T2.date_created, T1.id_app, T1.is_active
FROM Categoria T1
INNER JOIN DetalhesCategoria T2 on T1.id_app = T2.id
WHERE T1.fk_user = 4;
However I am doubtful how to execute this query by Querybuilder?
It follows how this currently:
$qb = $this->entityManager->createQueryBuilder();
$qb->select('T2.id, T2.name, T2.description, T2.qtde_users, T2.version, T2.img_thumb, T2.method_payment, T2.interval, T2.date_created, T1.id_app, T1.is_active')
->from('Application\\Entity\\Categoria', 'T1')
->innerJoin('Application\\Entity\\DetalhesCategoria', 'T2', 'T1.id_app = T2.id')
->where('T1.fk_user = ' . $idCurrentUser);
$results = $qb->getQuery()->getResult();
I doubt if the innerJoin is being passed correctly.