From 9889270c77262aff4ecf2682051ae548840ee982 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 6 May 2022 17:22:23 +0800 Subject: [PATCH] 5.0.7.8 --- .../SqlSugar/Abstract/QueryableProvider/NavigatManager.cs | 4 +++- Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs | 4 ++-- Src/Asp.Net/SqlSugar/SqlSugar.nuspec | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs index 8e33b8607..c4c1fab58 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs @@ -197,7 +197,7 @@ namespace SqlSugar var bEntity = navObjectNameColumnInfo.PropertyInfo.PropertyType.GetGenericArguments()[0]; var bEntityInfo = this.Context.EntityMaintenance.GetEntityInfo(bEntity); var bPkColumn = bEntityInfo.Columns.FirstOrDefault(it => it.IsPrimarykey); - + this.Context.InitMappingInfo(bEntity); var listItemPkColumn = listItemEntity.Columns.Where(it => it.IsPrimarykey).FirstOrDefault(); var ids = list.Select(it => it.GetType().GetProperty(listItemPkColumn.PropertyName).GetValue(it)).Select(it => it == null ? "null" : it).Distinct().ToList(); var mappingEntity = this.Context.EntityMaintenance.GetEntityInfo(navObjectNameColumnInfo.Navigat.MappingType); @@ -262,6 +262,7 @@ namespace SqlSugar var navColumn = listItemEntity.Columns.FirstOrDefault(it => it.PropertyName == navObjectNameColumnInfo.Navigat.Name); var navType = navObjectNamePropety.PropertyType; var navEntityInfo = this.Context.EntityMaintenance.GetEntityInfo(navType); + this.Context.InitMappingInfo(navEntityInfo.Type); var navPkColumn = navEntityInfo.Columns.Where(it => it.IsPrimarykey).FirstOrDefault(); Check.ExceptionEasy(navPkColumn==null, navEntityInfo.EntityName+ "need primarykey", navEntityInfo.EntityName + " 需要主键"); var ids = list.Select(it => it.GetType().GetProperty(navObjectNameColumnInfo.Navigat.Name).GetValue(it)).Select(it => it == null ? "null" : it).Distinct().ToList(); @@ -290,6 +291,7 @@ namespace SqlSugar { var navEntity = navObjectNameColumnInfo.PropertyInfo.PropertyType.GetGenericArguments()[0]; var navEntityInfo = this.Context.EntityMaintenance.GetEntityInfo(navEntity); + this.Context.InitMappingInfo(navEntityInfo.Type); var navColumn = navEntityInfo.Columns.FirstOrDefault(it => it.PropertyName == navObjectNameColumnInfo.Navigat.Name); Check.ExceptionEasy(navColumn == null, $"{navEntityInfo.EntityName} not found {navObjectNameColumnInfo.Navigat.Name} ", $"实体 {navEntityInfo.EntityName} 未找到导航配置列 {navObjectNameColumnInfo.Navigat.Name} "); //var navType = navObjectNamePropety.PropertyType; diff --git a/Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs b/Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs index bfbd4fa5e..3bb431ba0 100644 --- a/Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs +++ b/Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.0.7.7")] -[assembly: AssemblyFileVersion("5.0.7.7")] +[assembly: AssemblyVersion("5.0.7.8")] +[assembly: AssemblyFileVersion("5.0.7.8")] diff --git a/Src/Asp.Net/SqlSugar/SqlSugar.nuspec b/Src/Asp.Net/SqlSugar/SqlSugar.nuspec index 2f025df97..3fffd970b 100644 --- a/Src/Asp.Net/SqlSugar/SqlSugar.nuspec +++ b/Src/Asp.Net/SqlSugar/SqlSugar.nuspec @@ -2,7 +2,7 @@ SqlSugar - 5.0.7.7 + 5.0.7.8 .NET ORM Framework 版本, 5.0.3.3-max 最低要求 .Net Framework 4.6 | 5.0.0.2-5.0.3.2 最低要求 .Net Framework 4.5 | 4.0-4.9.11 最低要求 .Net Framework 4.0+ .NET ORM sun kaixuan landa