环境
MyEclipse 8.6+Hibernate3.2
问题
使用Hibernate出现如下错误:
org.hibernate.hql.ast.QuerySyntaxException: Unable to locate appropriate constructor on class [com.lo.entities.User] [select new User(u.userName,u.userAge) from com.lo.entities.User u]
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:54)
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:47)
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:82)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:261)
at org.hibernate.hql.ast.QueryTrans