更新时报字段指定不明确 返回
SqlSugar
沟通中
2
112
悬赏:0 飞吻
await _repME.Context.Updateable<PurchaseOrderDtl>().InnerJoin<Inventory>((a, b) => a.Id == b.PurchaseOrderDtlId)
.SetColumns((a, b) => new PurchaseOrderDtl
{
InstoreDate = input.DeliveryDate,
Ver = a.Ver + 1,
InstoreQty = a.InstoreQty + b.Quantity,
Closed = a.InstoreQty + b.Quantity == a.Quantity
}).Where((a, b) => b.PurchaseRecId == input.Id).ExecuteCommandAsync();
如上更新语句,sqlsugar在生成sql语句时,会把别名a给扔掉,导致a.Quantity变成了Quantity 然后就报aQuantity不明确了,生成语句时为什么要把a给扔掉呢?
热忱回答(2)
-
fate sta VIP0
2周前什么库
0 回复 -
浮舟沧海 VIP0
2周前postgresql
0 回复