And if so, under what circumstances?
Javadoc and JPA spec says nothing.
Given the implementation of getResultsList() in org.hibernate.ejb.QueryImpl class, it is possible to return a null :
public List getResultList() {
try {
return query.list();
}
catch (QueryExecutionRequestException he) {
throw new IllegalStateException(he);
}
catch( TypeMismatchException e ) {
throw new IllegalArgumentException(e);
}
catch (HibernateException he) {
em.throwPersistenceException( he );
return null;
}
My hibernate version is: 3.3.1.GA