当前使用版本(必填,否则不予处理)
3.3.1
该问题是如何引起的?(确定最新版也有问题再提!!!)
使用update(UpdateWrapper<>().lamda().eq().setEntity()) 时,提示sql语法错误
重现步骤(如果有就写完整)
SQL: UPDATE ops_contacts WHERE id=? AND ops_dc_user_id=? AND name=? AND phone=? AND job_position=? AND ding_ding_account=? AND mozi_account_id=? AND mozi_tenant_id=? AND is_deleted='N' AND (id = ?)
Cause: java.sql.SQLSyntaxErrorException: 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 id=10
AND ops_dc_user_id=1241 AND name='44444' AND phone='string' AND ' at line 2 ; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: 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 id=10 AND ops_dc_user_id=1241 AND name='44444' AND phone='string' AND ' at line 2
报错信息
提示sql语法错误, sql为 Update table where clomn = ....
Comment From: miemieYaho
你咋不给set值呢? set的Entity是用来生成where的
Comment From: Sunyb01
感谢
Comment From: xun404
你咋不给set值呢? set的Entity是用来生成where的
我觉的这地方要不要改一下,setEntity我也踩坑了,直觉setEntity是set 对象的,而不是where条件。
Comment From: xun404
你咋不给set值呢? set的Entity是用来生成where的
我觉的这地方要不要改一下,setEntity我也踩坑了,直觉setEntity是set 对象的,而不是where条件。
allEq(entity)