在hibernate 中用 sql ,并用别名出现列找不到的情况 使用这种方法。需要在query 中这样设置 query.addScalar("student.name",Hibernate.STRING);