Hi, guys...
I've very few experience with hibernate. Would like a help for this query:
Code:
Query query = session.createSQLQuery("select numdn,dtentregacor,codentidade from dn A,blocodn B"+
" where A.numblocodn=B.numblocodn and A.dtentregacor!= :dtentregacor and"+
" A.dtrecebcor= :dtrecebcor and A.numblocodn in(select numblocodn from blocodn"+
" where B.codentidade='"+hospit[i]+"')");
query.setParameter("dtentregacor","1000-01-01");
query.setParameter("dtrecebcor","1000-01-01");
String registro = query.uniqueResult().toString();
I'm getting NullPointerException in the line that contains the object registro.
What's wrong ?