From 50f15f837a6cf74c11f8032c823c780da3913516 Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Tue, 12 Oct 2021 17:29:46 +0800 Subject: [PATCH] Join BUG --- .../QueryableProvider/QueryableProvider.cs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs index 560596e80..8bfc169d8 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs @@ -48,6 +48,7 @@ namespace SqlSugar } public ISugarQueryable LeftJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -57,6 +58,7 @@ namespace SqlSugar public ISugarQueryable InnerJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -2492,6 +2494,7 @@ namespace SqlSugar { public ISugarQueryable LeftJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -2501,6 +2504,7 @@ namespace SqlSugar public ISugarQueryable InnerJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -2839,6 +2843,7 @@ namespace SqlSugar { public ISugarQueryable LeftJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -2848,6 +2853,7 @@ namespace SqlSugar public ISugarQueryable InnerJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -3249,6 +3255,7 @@ namespace SqlSugar { public ISugarQueryable LeftJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -3258,6 +3265,7 @@ namespace SqlSugar public ISugarQueryable InnerJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -3701,6 +3709,7 @@ namespace SqlSugar { public ISugarQueryable LeftJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -3710,6 +3719,7 @@ namespace SqlSugar public ISugarQueryable InnerJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -4115,6 +4125,7 @@ namespace SqlSugar { public ISugarQueryable LeftJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -4124,6 +4135,7 @@ namespace SqlSugar public ISugarQueryable InnerJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -4564,6 +4576,7 @@ namespace SqlSugar { public ISugarQueryable LeftJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -4573,6 +4586,7 @@ namespace SqlSugar public ISugarQueryable InnerJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -5004,6 +5018,7 @@ namespace SqlSugar { public ISugarQueryable LeftJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -5013,6 +5028,7 @@ namespace SqlSugar public ISugarQueryable InnerJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -5477,6 +5493,7 @@ namespace SqlSugar { public ISugarQueryable LeftJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -5486,6 +5503,7 @@ namespace SqlSugar public ISugarQueryable InnerJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -5886,6 +5904,7 @@ namespace SqlSugar { public ISugarQueryable LeftJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -5895,6 +5914,7 @@ namespace SqlSugar public ISugarQueryable InnerJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -6319,6 +6339,7 @@ namespace SqlSugar { public ISugarQueryable LeftJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context; @@ -6328,6 +6349,7 @@ namespace SqlSugar public ISugarQueryable InnerJoin(Expression> joinExpression) { + this.Context.InitMappingInfo(); var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); result.SqlBuilder = this.SqlBuilder; result.Context = this.Context;