- 修复 IUpdate.IngoreColumns/UpdateColumns 若实体指定别名后,可能无效的bug;

This commit is contained in:
28810
2019-05-30 17:11:55 +08:00
parent f64d0e9d56
commit b13b501131
10 changed files with 121 additions and 17 deletions

View File

@ -458,7 +458,7 @@ namespace FreeSql.Internal.CommonProvider {
_paramsSource.Clear();
var colidx = 0;
foreach (var col in _table.Columns.Values) {
if (col.Attribute.IsIdentity == false && col.Attribute.IsVersion == false && _ignore.ContainsKey(col.CsName) == false) {
if (col.Attribute.IsIdentity == false && col.Attribute.IsVersion == false && _ignore.ContainsKey(col.Attribute.Name) == false) {
if (colidx > 0) sb.Append(", ");
sb.Append(_commonUtils.QuoteSqlName(col.Attribute.Name)).Append(" = ");
var value = col.GetMapValue(_source.First());
@ -484,7 +484,7 @@ namespace FreeSql.Internal.CommonProvider {
_paramsSource.Clear();
var colidx = 0;
foreach (var col in _table.Columns.Values) {
if (col.Attribute.IsIdentity == false && col.Attribute.IsVersion == false && _ignore.ContainsKey(col.CsName) == false) {
if (col.Attribute.IsIdentity == false && col.Attribute.IsVersion == false && _ignore.ContainsKey(col.Attribute.Name) == false) {
if (colidx > 0) sb.Append(", ");
sb.Append(_commonUtils.QuoteSqlName(col.Attribute.Name)).Append(" = ");