Good morning I have a problem when making a query with Hibernate, the thing is that I would like to join two consultations in one and I have looked to try it with joins and others but no idea. Let the queries have if you can guide me please, what I need is the result of each of them together. Thanks in advance.
QUERY 1:
criteria.add(Restrictions.sqlRestriction(
"id_oferta in(select idoferta from nx_ofertas_candidatos where idstudent=? and select_auto=1 and select_manual=1 and interesado=0)",
idStudentInteres,
Hibernate.LONG));
QUERY 2:
criteria.add(Restrictions.sqlRestriction(
"id_oferta not in (select idoferta from nx_ofertas_candidatos where idstudent=? and nointeresado=0)",
idStudentInteres,Hibernate.LONG));