Bom dia,
Como faço para fazer uma subquery com o hibernate?
Query
select * from brand
where not exists(select 1 from history h
where h.iduser = 1
and h.idbrand = brand.idbrand
and DATE_ADD(h.datecreate, INTERVAL 1 DAY) >= now())
tentei por directamente no createQuery, (session.createQuery("from " + table + " " + whereClause ) mas já percebi que não dá.
Já tive a pesquisar o Criteria mas mesmo assim não consegui perceber como fazer.
Será que alguém pode dar uma mãozinha?
Cumprimentos,
