I\'ve this question:
\"... if the query just returns a number (i.e., the query is something like ‘select count(id) where…..) I came up against this error
I did a work around using createQuery() instead: http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/objectstate.html#objectstate-querying