使用MyBatis的时候,主键的字段建议绑定在Bean的属性上面,

import javax.persistence.*;

public class User {
@Id
@Column(name = "systemId")
private Long systemid;
}

否则会报错,以下是报错原文

"### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: Unknown column 'system_id' in 'field list'

### The error may exist in cn/gobyte/apply/dao/user/userMapper.java (best guess)### The error may involve cn.gobyte.apply.dao.user.userMapper.selectByExample-Inline### The error occurred while setting parameters

### SQL: SELECT  system_id,id,password,tswt,mmda,email,sid,name,birthd,gender,mz,zzmm,tel,address,school,schoolc,major,gkbmh,bkmajor,mcode,jl,tc,lxaddress,yb,state,sj,zkzh,sf,creat_time,modify_time,last_login_time,theme,avatar,description,account_status  FROM users  WHERE (       (  id= ? ) )

### Cause: java.sql.SQLSyntaxErrorException: Unknown column 'system_id' in 'field list'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column 'system_id' in 'field list'"

Mybatis 未设置主键映射报错;Cause: java.sql.SQLSyntaxErrorException: Unknown column 'system_id' in 'field list'的更多相关文章

  1. Mybatis操作数据时出现:java.sql.SQLSyntaxErrorException: Unknown column 'XXX' in 'field list'

    这个错误比较重要,而且很常见,故单独进行说明: Mybatis出现:Unknown column 'xxx' in 'field list' 先来看一下程序的内部: dao.addUser(" ...

  2. mysql报错:java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.

    mybatis链接mysql,启动服务报错: java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecogni ...

  3. mysql插入报错:java.sql.SQLException: Incorrect string value: '\xE6\x9D\xAD\xE5\xB7\x9E...' for column 'address' at row 1

    界面报错: 日志报错: java.sql.SQLException: Incorrect at com.mysql.cj.jdbc.exceptions.SQLError.createSQLExcep ...

  4. JavaWeb报错:java.sql.SQLException: Invalid value for getInt()

    1.错误描述:在对数据库进行操作时,控制台报错:java.sql.SQLException: Invalid value for getInt() :2.错误原因:数据库中表的字段的类型与实体类中属性 ...

  5. java.sql.SQLException: Unknown column 'user0_.user_name' in 'field list' 报错问题

    报错信息: java.sql.SQLException: Unknown column 'user0_.user_name' in 'field list'Query is: select user0 ...

  6. spring+ibatis问题1—— 程序报错:java.sql.SQLException: Io 异常: Connection reset by peer, socket write error; ”或“java.sql.SQLException 关闭的连接”异常

    转自:http://blog.sina.com.cn/s/blog_1549fb0710102whz2.html spring+ibatis程序测试时报错:java.sql.SQLException: ...

  7. Oracal主键 唯一报错

    ORA-00001: 违反唯一约束条件 --解决方法 2017年07月27日 12:04:11 阅读数:11853 1.错误 Caused by: java.sql.BatchUpdateExcept ...

  8. mybatis之insert语句报错Cause: java.sql.SQLException: sql injection violation, syntax error: ERROR. token : WHERE,

    报错日志:org.springframework.jdbc.UncategorizedSQLException: Error updating database. Cause: java.sql.SQ ...

  9. mybatis项目报错:java.sql.SQLException: ORA-00911: 无效字符 解决方法

    如果你用java写程序访问数据库,出现这个问题:java.sql.SQLException: ORA-00911: 无效字符 at oracle.jdbc.driver.DatabaseError.t ...

随机推荐

  1. <bgsound> - 背景音乐

    摘要 项目 说明 形式 <bgsound src="..."> 支持 e2+ 标签省略 开始标签:必须,结束标签:无 ■ 说明 bgsound 是 background ...

  2. javascript参数arguments对象

    ECMAScript函数的参数与大多树其他语言中函数的参数有所不同.ECMAScript函数不介意传递进来多少个参数,也不在乎传进来参数是什么类型.函数体是通过arguments对象来访问参数数组.a ...

  3. 翻译:A Tutorial on the Device Tree (Zynq) -- Part V

    A Tutorial on the Device Tree (Zynq) -- Part V Application-specific data 之前提过,设备树中是一些特殊信息,这样一个驱动可以管理 ...

  4. Delphi和C++的语法区别 (关于构造和析构)

    目录 Delphi永远没办法在栈上创建一个对象 Delphi的构造函数更象是个类方法(静态成员函数) Delphi的析构函数中可以调用纯虚方法 Delphi在构造对象时自动将成员变量清零 Delphi ...

  5. AndroidCityPicker仿IOS选择效果

    近期的一个项目由于android端与IOS端须要同步,所以在城市选择器这里做了一个相似IOS的CityPicker控件,当然由于本人水平问题显示效果比IOS上面还是有一定差距的.OK先让大家看下效果. ...

  6. IP数据报首部格式

    IP协议提供不可靠.无连接的数据报传送服务. 不可靠:尽力而为地传输,不保证IP数据报能成功到达目的地. 无连接:每一个数据报之间相互独立地进行路由选择,可不按发送顺序接收. IP首部格式例如以下: ...

  7. HDU 6058 Kanade's sum 二分,链表

    Kanade's sum Problem Description Give you an array A[1..n]of length n. Let f(l,r,k) be the k-th larg ...

  8. 一条数据的HBase之旅,简明HBase入门教程-开篇

    常见的HBase新手问题: 什么样的数据适合用HBase来存储? 既然HBase也是一个数据库,能否用它将现有系统中昂贵的Oracle替换掉? 存放于HBase中的数据记录,为何不直接存放于HDFS之 ...

  9. zTree async 动态参数处理

    async:{ enable: true,//开启异步机制 url: opts.url,//异步地址 otherParam: {  'plateNo': function(){ return $('# ...

  10. LeetCode之16----3Sums Closest

    题目: Given an array S of n integers, find three integers in S such that the sum is closest to a given ...