Update oracle OffIdentity

This commit is contained in:
sunkaixuan
2023-06-10 20:40:16 +08:00
parent 4238d56394
commit e21aa62216

View File

@@ -91,7 +91,7 @@ namespace SqlSugar
batchInsetrSql.Append("("); batchInsetrSql.Append("(");
batchInsetrSql.Append(columnsString); batchInsetrSql.Append(columnsString);
if (identities.HasValue()) if (identities.HasValue()&& this.IsOffIdentity==false)
{ {
batchInsetrSql.Append("," + string.Join(",", identities.Select(it => Builder.GetTranslationColumnName(it.DbColumnName)))); batchInsetrSql.Append("," + string.Join(",", identities.Select(it => Builder.GetTranslationColumnName(it.DbColumnName))));
} }
@@ -101,6 +101,8 @@ namespace SqlSugar
batchInsetrSql.Append("("); batchInsetrSql.Append("(");
insertColumns = string.Join(",", item.Select(it => GetDbColumn(it, FormatValue(it.Value, it.PropertyName)))); insertColumns = string.Join(",", item.Select(it => GetDbColumn(it, FormatValue(it.Value, it.PropertyName))));
batchInsetrSql.Append(insertColumns); batchInsetrSql.Append(insertColumns);
if (this.IsOffIdentity == false)
{
if (identities.HasValue()) if (identities.HasValue())
{ {
batchInsetrSql.Append(","); batchInsetrSql.Append(",");
@@ -118,6 +120,7 @@ namespace SqlSugar
} }
} }
} }
}
batchInsetrSql.AppendLine(") "); batchInsetrSql.AppendLine(") ");
} }