mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
- 增加 InsertProvider 对 InsertValueSql 自增字段的处理;
This commit is contained in:
@ -501,7 +501,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
var colidx = 0;
|
||||
foreach (var col in _table.Columns.Values)
|
||||
{
|
||||
if (col.Attribute.IsIdentity && _insertIdentity == false) continue;
|
||||
if (col.Attribute.IsIdentity && _insertIdentity == false && string.IsNullOrEmpty(col.DbInsertValue)) continue;
|
||||
if (col.Attribute.IsIdentity == false && _ignore.ContainsKey(col.Attribute.Name)) continue;
|
||||
|
||||
if (colidx > 0) sb.Append(", ");
|
||||
@ -520,7 +520,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
var colidx2 = 0;
|
||||
foreach (var col in _table.Columns.Values)
|
||||
{
|
||||
if (col.Attribute.IsIdentity && _insertIdentity == false) continue;
|
||||
if (col.Attribute.IsIdentity && _insertIdentity == false && string.IsNullOrEmpty(col.DbInsertValue)) continue;
|
||||
if (col.Attribute.IsIdentity == false && _ignore.ContainsKey(col.Attribute.Name)) continue;
|
||||
|
||||
if (colidx2 > 0) sb.Append(", ");
|
||||
|
Reference in New Issue
Block a user