hql 查询 sql的句子变换成查询MYSQL
Queryquery=baseDao.getSession().createQuery("fromEmployeeMainwhereemployeeId=:userId"...
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: 42000
15:28:10,160 WARN org.hibernate.util.JDBCExceptionReporter:71 - SQL Error: 1064, SQLState: 42000
JDBCExceptionReporter-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
15: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
请高人帮忙指导一下! 展开
return query.list();
这段句子查询sql sever数据库没问题,但是查询MYSQL就报错
JDBCExceptionReporter-SQL Error: 1064, SQLState: 42000
15:28:10,160 WARN org.hibernate.util.JDBCExceptionReporter:71 - SQL Error: 1064, SQLState: 42000
JDBCExceptionReporter-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
15: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
请高人帮忙指导一下! 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询