Oracle EnableOracleIdentity=true nav insert bug

This commit is contained in:
sunkaixuan 2024-05-07 22:48:09 +08:00
parent 17e24d147d
commit 76f8872615

View File

@ -270,6 +270,14 @@ namespace SqlSugar
{
var result = InsertObjs.First();
var identityKeys = GetIdentityKeys();
if (this.Context?.CurrentConnectionConfig?.MoreSettings?.EnableOracleIdentity == true)
{
var identity=this.EntityInfo.Columns.FirstOrDefault(it => it.IsIdentity);
if (identity != null)
{
identityKeys = new List<string>() { identity.DbColumnName };
}
}
if (identityKeys.Count == 0)
{
var snowColumn = this.EntityInfo.Columns.FirstOrDefault(it => it.IsPrimarykey && it.UnderType == UtilConstants.LongType);