- 论坛徽章:
- 0
|
Query query = baseDao.getSession().createQuery("from EmployeeMain where employeeId=:userId");
query.setString("userId", userId);
return query.list();
这段句子查询sql sever数据库没问题,但是查询MYSQL数据库就报错
JDBCExceptionReporter-SQL Error: 1064, SQLState: 4200015:28:10,160 WARN org.hibernate.util.JDBCExceptionReporter:71 - SQL Error: 1064, SQLState: 42000JDBCExceptionReporter-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 '.employee_main employeema0_ where employeema0_.employee_id='01029'' at line 115:28:10,160 ERROR org.hibernate.util.JDBCExceptionReporter:72 - 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 '.employee_main employeema0_ where employeema0_.employee_id='01029'' at line 1
请高人帮忙指导一下! |
|