SSH 查看客户时发生的错误

严重: Exception occurred during processing request: customer_info is not mapped [from customer_info]; nested exception is org.hibernate.hql.internal.ast.QuerySyntaxException: customer_info is not mapped [from customer_info]
org.springframework.orm.hibernate5.HibernateQueryException: customer_info is not mapped [from customer_info]; nested exception is org.hibernate.hql.internal.ast.QuerySyntaxException: customer_info is not mapped [from customer_info]


CusDAOimpl中HQL语句里

public List<CusInfo_fy> findALL() {
        String querystr="from customer_info";
        List<CusInfo_fy> list = (List<CusInfo_fy>) this.getHibernateTemplate().find(querystr);
        return list;
    }
customer_info是我数据库中的表名,但是应该写 在javaweb中需要映射的实体类 CusInfo

严重: Exception occurred during processing request: customer_info is not mapped [from customer_info]; nested exception is org.hibernate.hql.internal.ast.QuerySyntaxException: customer_info is not mapped [from customer_info]
org.springframework.orm.hibernate5.HibernateQueryException: customer_info is not mapped [from customer_info]; nested exception is org.hibernate.hql.internal.ast.QuerySyntaxException: customer_info is not mapped [from customer_info]

猜你喜欢

转载自www.cnblogs.com/Nora-F/p/8983700.html
ssh