I have the following script that is functional:
SELECT
r.coluna_1 as Coluna_1,
e.coluna_1 as Coluna_2,
FROM produto r
INNER JOIN empresa e ON r.id_empresa = e.id_empresa
WHERE r.id_tipo = 'N'
AND r.data_devolucao <= :dataDevolucao
AND e.id_empresa IS NOT NULL
AND e.id_empresa = :empresa
AND (select count(*) from produto_nota rn
where rn.id_nota_tipo = 14
and id_reserva = r.id_reserva) = 0
GROUP BY r.id_produto
I have been looking at some examples of how to use [Doctrine ResultSetMapping][1]
, but due to my lack of knowledge about doctrine I have not yet succeeded.
Could anyone help me?