org.hibernate.hql.internal.ast.tree.PathNode如何解决

select distinct new Order(o.userName,o.pId,o.quantity,o.buyTime,p.pName,p.pSalePrice) from Order o,Products p where o.pId=p.pId and o.order_id='TNT1463830675322'

java.lang.ClassCastException: org.hibernate.hql.internal.ast.tree.SqlNode cannot be cast to org.hibernate.hql.internal.ast.tree.PathNode

不知道 出错在哪?。。。。。。

加上包名就好了。

select distinct new xxx.xxx.Order(o.userName,o.pId,o.quantity,o.buyTime,p.pName,p.pSalePrice) from Order o,Products p where o.pId=p.pId and o.order_id='TNT1463830675322'

Order是关键字