Example Criteria Hibernate Multiple Join/Table SQL

Viewed 4678

I have this SQL query

select pr.*,p.id, cf.nome, p.valor_total as "valor total", f.descricao as "forma de pagamento", t.descricao as "tipo de pagamento", s.descricao as "Status" from pedido p
    left join cliente c on c.id = p.id_cliente
    left join cliente_pessoa_fisica cf on cf.id_cliente = c.id
    left join forma_pagamento f on f.id = p.id_forma_pagamento
    left join tipo_pagamento t on t.id = p.id_tipo_pagamento
    left join status_pedido s on s.id = p.id_status_pedido
    left join itempedido itp on itp.id_pedido = p.id
    left join produto pr on pr.id = itp.id_produto

How I can make a Criteria Hibernate SQL using this query?

1 Answers
Related