mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 修复 Aop.AuditValue 与 FreeSql.Repository 主键状态管理的冲突;
This commit is contained in:
@ -68,15 +68,6 @@ namespace FreeSql.Oracle.Curd
|
||||
|
||||
if (colidx2 > 0) sb.Append(", ");
|
||||
object val = col.GetMapValue(d);
|
||||
if (col.Attribute.IsPrimary && col.Attribute.MapType.NullableTypeOrThis() == typeof(Guid) && (val == null || (Guid)val == Guid.Empty))
|
||||
col.SetMapValue(d, val = FreeUtil.NewMongodbId());
|
||||
if (_orm.Aop.AuditValue != null)
|
||||
{
|
||||
var auditArgs = new Aop.AuditValueEventArgs(Aop.AutoValueType.Insert, col, _table.Properties[col.CsName], val);
|
||||
_orm.Aop.AuditValue(this, auditArgs);
|
||||
if (auditArgs.IsChanged)
|
||||
col.SetMapValue(d, val = auditArgs.Value);
|
||||
}
|
||||
if (_noneParameter)
|
||||
sb.Append(_commonUtils.GetNoneParamaterSqlValue(specialParams, col.Attribute.MapType, val));
|
||||
else
|
||||
|
Reference in New Issue
Block a user