j2ee的hibernate数据库不能更新Could not execute JDBC batch update
来源:百度知道 编辑:UC知道 时间:2024/05/17 08:36:44
Hibernate: update user set name=?, username=?, password=?, sex=?, where=?, qq=?, email=?, age=?, introduce=?, regdatetime=?, enddatetime=? where id=?
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
Caused by: java.sql.BatchUpdateException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where='电信一区', qq=null, email=null, age=null, introduce=null, regdatetime=nul' at line 1
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
Caused by: java.sql.BatchUpdateException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where='电信一区', qq=null, email=null, age=null, introduce=null, regdatetime=nul' at line 1
貌似是你的字段用了sql的关键字的问题
where=‘电信一区’,你把这个where字段换个别的名试下;
修改的实体可能不符合hibernate的状态规则。
建议你用get方式获得实体,然后修改实体,然后update。
J2EE 与hibernate
java, jsp, struts, weblogic ,Hibernate, j2ee ,xml,等等,学习的最好顺序是什么
谁知道学习j2ee框架(struts+hibernate+spring)的好书高手帮我推荐几本
求struts spring hibernate等j2ee教程
J2EE问题(关于hibernate和JPA)
学j2ee最好Hibernate ,struts ,spring 都精通吗?
求魔乐J2EE(struts,hibernate,spring)视频!!!全部
各位大虾,能解释一下java/j2ee/hibernate/MVC/webwork/spring/数据库之间的关联关系?由衷感谢!
有关hibernate的 update
Hibernate 环境的配置