代码之家  ›  专栏  ›  技术社区  ›  Mahmoud Saleh

java.lang.illegalStateException:节点没有数据类型:org.hibernate.hql.ast.tree.methodnode

  •  -1
  • Mahmoud Saleh  · 技术社区  · 14 年前

    大家好,我在下面的方法中得到了这个异常,我不知道为什么:

    List<Date> temps = getCurrentSession()
                    .createQuery(
                            "select distinct date(uploadDate) from FileDomain where projectId=:projectId"
                                    + " and entityId not in(select fileId from FileVersion) order by date(uploadDate) desc ")
                    .setLong("projectId", projectId).list();
    
    1 回复  |  直到 14 年前
        1
  •  2
  •   pstanton    14 年前

    尝试删除 date() distinct date(uploadDate) 所以它只是 select distinct uploadDate from...

    最可能的问题是您的方言没有配置 date 功能,因此如果不需要,请将其移除。