Update nav query default value

This commit is contained in:
sunkaixuan
2025-12-11 12:46:16 +08:00
parent e8837d68b0
commit 84e522b14f
2 changed files with 6 additions and 1 deletions

View File

@@ -428,7 +428,10 @@ namespace SqlSugar
var firstObj = navObjectNamePropety.GetValue(item);
if (OneToOneGlobalInstanceRegistry.IsNavigationInitializerCreated(firstObj))
{
navObjectNamePropety.SetValue(item, null);
if (StaticConfig.QueryOneToOneEnableDefaultValue==false)
{
navObjectNamePropety.SetValue(item, null);
}
}
}
}

View File

@@ -40,5 +40,7 @@ namespace SqlSugar
public static Action<ICacheService, string> CacheRemoveByLikeStringFunc { get; set; }
public static Guid TableQuerySqlKey { get; set; }
public static string BulkCopy_MySqlCsvPath { get; set; }
public static bool QueryOneToOneEnableDefaultValue { get; set; }
}
}