org.hibernate.hql.ast.QuerySyntaxException: buyer is not mapped

简介: hibernate   setProperties(map) 设置参数时老是提示 org.hibernate.hql.ast.QuerySyntaxException: buyer is not mapped  1.看是否忘记将hibernate的映射文件添加到Hibernate.cfg.xml(使用Hibernate时)或者applicationContext.xml中

hibernate   setProperties(map) 设置参数时老是提示 org.hibernate.hql.ast.QuerySyntaxException: buyer is not mapped 


1.看是否忘记将hibernate的映射文件添加到Hibernate.cfg.xml(使用Hibernate时)或者applicationContext.xml中

2.检查表中的字段和映射文件中的字段是否一一对应

3.检查字段名是否使用了数据库中的关键字

4.HQL语句是否正确

5. sql语句的类名是否存在(注意大小写),字段名是否匹配。

目录
相关文章
|
2天前
|
Java 数据库连接
错误org.hibernate.AnnotationException: No identifier specified for entity
请根据你的实际情况,将实体类中的字段和注解进行适当的调整,以确保每个实体类都有一个明确定义的标识符(主键)。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
4 0
|
4月前
|
Java 数据库连接 数据库
Mybatis JDBC No enum constant org.apache.ibatis.type.JdbcType.TEXT异常处理
Mybatis JDBC No enum constant org.apache.ibatis.type.JdbcType.TEXT异常处理
76 0
|
4月前
|
Java 数据库连接
Hibernate query.list()
在Hibernate中,用hql语句查询实体类,采用List方法的返回结果为一个List,该List中封装的对象分为以下三种情况。
|
5月前
org.apache.ibatis.builder.BuilderException: An invalid property ‘jdbcType ‘ was found in mapping
org.apache.ibatis.builder.BuilderException: An invalid property ‘jdbcType ‘ was found in mapping
|
6月前
|
XML Java 数据库连接
MyBatis参数映射问题解决教程: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 wit
MyBatis参数映射问题解决教程: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 wit
272 1
|
10月前
org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.dao.IndexDao.Use
org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.dao.IndexDao.Use
61 0
|
10月前
|
SQL
org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration
org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration
66 0
|
SQL 消息中间件 资源调度
Could not find a suitable table factory for ‘org.apache.flink.table.factories.TableSourceFactory
这是在提交yarn时报的错误,原因其实就是少了一些包,提交的集群后一些依赖包使用flink的lib目录下的,所以我需要将一些依赖包放到lib目录下。
318 0
Could not find a suitable table factory for ‘org.apache.flink.table.factories.TableSourceFactory
|
XML Java 数据库连接
springboot整合mybatis中:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
在项目的启动过程中如果出现:以下报错信息,则可以从以下几个方面入手排查问题。 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 一般的原因是Mapper interface和xml文件的定义对应不上,需要检查包名,namespace,函数名称等能否对应上,需要比较细致的对比,这是第二次出现这种异常。我每次都是按照如下方法去逐一排查的,到最后都能解决问题。
648 0
|
Java 数据库连接
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hi
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hi
128 0