Returning a numeric value with hibernate @NamedNativeQuery

前端 未结 3 2034
挽巷
挽巷 2021-01-06 11:57

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

3条回答
  •  失恋的感觉
    2021-01-06 12:32

    I did a work around using createQuery() instead: http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/objectstate.html#objectstate-querying

提交回复
热议问题