could not resolve property

废话不说,直接上错误提示

could not resolve property: type of: com.czd.shopping.pojo.Category [FROM com.czd.shopping.pojo.Category c WHERE c.type LIKE :ctype]; nested exception is org.hibernate.QueryException: could not resolve property: type of: com.czd.shopping.pojo.Category [FROM com.czd.shopping.pojo.Category c WHERE c.type LIKE :ctype]

然后发现原因,是因为  我们的hibernate 使用的是HQL 语句,也就是 通过 写 类 和 属性的  查询,在这里 我们可以看到     c.type这里出了问题,因此我们做修改c.ctype就好

这个错误的原因就是,HQL错误属性,导致,我们的hibernate无法去解决 属性 问题,因此之后在遇到这样的问题,就要细心的去检查 我们的属性是否在javabena中存在

原文地址:https://www.cnblogs.com/obesityspace/p/6608059.html