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

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 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了