zoukankan      html  css  js  c++  java
  • org.hibernate.hql.ast.QuerySyntaxException: tb_voteoption is not mapped [from tb_voteoption where voteID=?]

    转自:https://www.cnblogs.com/albert1017/archive/2012/08/25/2656873.html

    org.hibernate.hql.ast.QuerySyntaxException: tb_voteoption is not mapped [from tb_voteoption where voteID=?]

    解决方案:
    这一般是HQL语句错误
    因为Hibernate是对类查询的 ,而不是对数据库表进行查询
    例如:
    return getHibernateTemplate().find("from organization o where o.parent.id=?", new Integer(parentId));
    organization 是数据库中的表,而organization 对应的类是Organization.java,现在只需要将teachers改为Teachers就可以了,即
    我们将 "from organization o where o.parent.id=?" 改成
    "from Organization o where o.parent.id=?"就ok了

  • 相关阅读:
    bzoj3280
    bzoj3876
    洛谷 p1625
    bzoj1407
    bzoj1227
    bzoj1477 && exgcd学习笔记
    bzoj1345
    c#程序的config文件问题
    思维角度的重要性
    python异步初步窥探
  • 原文地址:https://www.cnblogs.com/sharpest/p/6032098.html
Copyright © 2011-2022 走看看