转自: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了

org.hibernate.hql.ast.QuerySyntaxException: tb_voteoption is not mapped [from tb_voteoption where voteID=?]的更多相关文章

  1. SSH执行hql报错:Caused by: org.hibernate.hql.ast.QuerySyntaxException: user is not mapped [from user where username = ?]

    报错信息: ERROR Dispatcher:38 - Exception occurred during processing request: user is not mapped [from u ...

  2. org.hibernate.hql.ast.QuerySyntaxException: Student is not mapped [from Student as stu where stu.sclass=?]

    java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: t_aty_disease is not ...

  3. org.hibernate.hql.ast.QuerySyntaxException: XXX is not mapped

    因为 String sql2 = "select s from Student s where s.clazz.name=:name"; 此处的 Student 应该为类名.hql ...

  4. SSH整合报错:org.hibernate.hql.internal.ast.QuerySyntaxException: User is not mapped[......]

    非常诡异的报错,信息如下:org.hibernate.hql.internal.ast.QuerySyntaxException: User is not mapped [select count(* ...

  5. org.hibernate.hql.internal.ast.QuerySyntaxException: XXX is not mapped

    异常情况: 最近在把一个项目拆分多个 module 的时候数据库查询遇到这个异常:org.hibernate.hql.internal.ast.QuerySyntaxException: Identi ...

  6. 继承映射中的java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: person is not mapped [FROM person]

    继承映射中查询对象的过程中报错: java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxExcep ...

  7. java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: student is not mapped

    Spring 5.0 +Jpa,使用@Query实现 自定义查询报错: java.lang.IllegalArgumentException: org.hibernate.hql.internal.a ...

  8. Spring Data JPA开发中遇到的问题1:org.hibernate.hql.internal.ast.QuerySyntaxException: DispatchShift is not mapped

    org.hibernate.hql.internal.ast.QuerySyntaxException: T_D_SHIFT_DISPATCH is not mapped 错误原因: 没有映射到表,经 ...

  9. weblogic10异常:org.hibernate.hql.ast.HqlToken

    转自:http://www.programgo.com/article/68682994452/ 在做查询的时候,报出  org.hibernate.QueryException: ClassNotF ...

随机推荐

  1. Mac升级系统后 Pod Install报错-不能用 解决办法

    brew reinstall cocoapods brew install ruby brew link --overwrite cocoapods 最近将Mac OS升级到10.15.1 ,再回来初 ...

  2. Java——容器

    [容器API]    <1>J2SDK所提供的容器位于java.util包内.  

  3. 小波神经网络(WNN)

    人工神经网络(ANN) 是对人脑若干基本特性通过数学方法进行的抽象和模拟,是一种模仿人脑结构及其功能的非线性信息处理系统. 具有较强的非线性逼近功能和自学习.自适应.并行处理的特点,具有良好的容错能力 ...

  4. C++ 对象间通信框架 V2.0 ××××××× 之(四)

    类定义:CMemberFuncPointer ======================================================================= // Me ...

  5. Gradle 学习笔记

    配置 Gradle 的环境变量 export GRADLE_HOME=/opt/software/java/gradle-3.1 export PATH=\(PATH:\)GRADLE_HOME/bi ...

  6. Uncaught TypeError: Cannot read property 'length' of null错误怎么处理?

    Uncaught TypeError: Cannot read property 'length' of null 错误怎么处理? 1.可能是返回的datagrid数据格式有问题,比如{"t ...

  7. Oracle OLAP

    w 国产商业智能 BI 这 20 年(1997-2017)| 天善智能  http://mp.weixin.qq.com/s/VJURX2qhmL0Uj1dctMyEig 1997-2001年,萌芽阶 ...

  8. NLog记录日志到本地或数据库

    OperatorLog CREATE TABLE [dbo].[OperatorLog]( ,) NOT NULL, [Createdate] [DATETIME] NOT NULL DEFAULT ...

  9. Java中使用MATLAB作图 .

    最近做一个项目,需要很多进行很多信号处理——小魏就是学软件的,对信号处理简直是个小白,最简单的实现就是傻瓜似的调用MATLAB的各种工具箱,达到目的就行. 同时,MATLAB是种解释性语言,执行效率比 ...

  10. 阶段1 语言基础+高级_1-3-Java语言高级_03-常用API第二部分_第6节 基本类型包装类_1_包装类的概念

    只有这两个比较特殊