- 修复 IncludeMany ManyToMany,若中间表未使用 延时加载 属性功能时,出现的 bug;

This commit is contained in:
28810
2019-05-17 15:16:08 +08:00
parent c43371884b
commit 5f3aaac19b
4 changed files with 175 additions and 3 deletions

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>0.5.19</Version>
<Version>0.5.20</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>YeXiangQin</Authors>
<Description>FreeSql is the most convenient ORM in dotnet. It supports Mysql, Postgresql, SqlServer, Oracle and Sqlite.</Description>

View File

@ -658,7 +658,7 @@ namespace FreeSql.Internal.CommonProvider {
var field = new StringBuilder();
var read = new ReadAnonymousTypeInfo();
read.ConsturctorType = ReadAnonymousTypeInfoConsturctorType.Properties;
read.Consturctor = tbrefMid.TypeLazy.GetConstructor(new Type[0]);
read.Consturctor = (tbrefMid.TypeLazy ?? tbrefMid.Type).GetConstructor(new Type[0]);
read.Table = tbrefMid;
foreach (var col in tbrefMid.Columns.Values) {
if (tbref.MiddleColumns.Where(a => a.CsName == col.CsName).Any() == false) continue;