10:16:55.616 [http-nio-8080-exec-8] ERROR org.hibernate.hql.internal.ast.ErrorCounter -  Unable to locate appropriate constructor on class [com.qianxunkuaiji.entity.query.ChronologicalBookQuery]. Expected arguments are: java.util.Date, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, double, double, int
[cause=org.hibernate.PropertyNotFoundException: no appropriate constructor in class: com.qianxunkuaiji.entity.query.ChronologicalBookQuery]

ERROR org.hibernate.hql.internal.ast.ErrorCounter - Invalid path

答:

ERROR org.hibernate.hql.internal.ast.ErrorCounter - Invalid path

上面的voucher.voucherType.voucherType刚开始写的是voucher.voucherType,这个是获取到一个voucherType对象

在对应 query查询类里刚开始定义的是VoucherType voucherType,不确定能不能获取到对象

所以直接定义成了String,对应的hql语句里new的也改成了voucher.voucherType.voucherType-String类型。

ERROR org.hibernate.hql.internal.ast.ErrorCounter - Invalid path

相关文章: