MySql Update的bug 返回
C#论坛
老数据
2
2076
悬赏:5 飞吻
MySql 8.0
Code:
var aaa = SysDb.Updateable<LTB_ContentType>().SetColumns(x => new LTB_ContentType { Id = 1111111, UpdateUser = 222222, UpdateTime = DateTime.Now }).Where(whereExpression).ToSql();

Sqlsugar生成的SQL:
UPDATE `LTB_ContentType` SET
`UpdateTime` = @Const2 , `UpdateUser` = @Const1 WHERE ( `PId` = @PId3 )
正确的脚本:
UPDATE `LTB_ContentType` SET 'Id' =@Const0
`UpdateTime` = @Const2 , `UpdateUser` = @Const1 WHERE ( `PId` = @PId3 )
热忱回答(2)
-
fate stay night VIP0
2019/6/15主键不支持更新
0 回复 -
Mirage VIP0
2019/6/181-我实体的主键并没有设置,生成的脚本一样不对.

2-我该怎么取实现这个功能?
0 回复