qq_28573739 2016-03-21 01:52 采纳率: 100%
浏览 2084
已采纳

hql查询报错。。。。实体类问题

hql语句:
String hql="from CouponPublishEntity e inner join e.couponpool c where c.owner='"+userId+"' and e.pubid in ("+ids+") ";
报错
[org.jeecgframework.core.common.exception.GlobalExceptionResolver]全局处理异常捕获:
org.hibernate.QueryException: could not resolve property: couponpool of: com.sendiy.hh.coupons.entity.CouponPublishEntity [from com.sendiy.hh.coupons.entity.CouponPublishEntity e inner join e.couponpool c where c.owner='4028668150c6aedb0150c6ddde750005' and e.pubid in ('2') ]
问题是实体类写错了吗,还是语法错了·

  • 写回答

2条回答 默认 最新

  • zhangsiqiong 2016-03-21 02:15
    关注

    实体类中没有找到couponpool,看是不是你实体类中不是这样写的, hql区分大小写

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog