From b4e1f03ef62746654d46d152625a4aa5ecafcdb6 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sat, 1 Feb 2025 14:48:54 +0800 Subject: [PATCH] Update OwnsOne --- .../Abstract/EntityMaintenance/EntityMaintenance.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs index e04255963..90916e5c4 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs @@ -422,7 +422,13 @@ namespace SqlSugar if (!column.EntityName.ObjToString().StartsWith("<>f__AnonymousType") &&column.PropertyInfo?.ReflectedType!=typeof(DbTableInfo)) { + var isOldOwnsOne = column.IsOwnsOne; this.Context.CurrentConnectionConfig.ConfigureExternalServices.EntityService(property, column); + if (column.IsOwnsOne == true && isOldOwnsOne == false) + { + SetValueObjectColumns(result, property, column); + continue; + } } } if (column.PropertyInfo.DeclaringType != null