插入数据Insert,会把CreateTime字段排除掉,手动赋值CreateTime不会排除掉 返回
SqlSugar
老数据
6
1365
悬赏:5 飞吻


热忱回答(6)
-
Jeff VIP0
2021/10/16
0 回复 -
fate sta VIP0
2021/10/16public class Order { [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } public string Name { get; set; } public decimal Price { get; set; } [SugarColumn(IsOnlyIgnoreInsert =true)]//设置后插入会取数据库默认值 public DateTime CreateTime { get; set; } }0 回复 -
fate sta VIP0
2021/10/16最简单的方式上加上 IsOnlyIgnoreInsert
0 回复 -
fate sta VIP0
2021/10/16或者用updatecolumns指定哪些列插入
0 回复 -
Jeff VIP0
2021/10/16@fate sta:不好意思,是我写错了,不能这样写

0 回复 -
fate sta VIP0
2021/10/17SqlSugarCore 5.0.4.3-Preview01 版本发布过了,就修复了你的过滤器多表查询多参数的问题
0 回复