From 153125cf006b97c9d44ccd00a0185c80cbdd4f28 Mon Sep 17 00:00:00 2001 From: jiejiecn Date: Thu, 12 Jan 2017 09:48:53 +0800 Subject: [PATCH] Fix Update issue on MySQL Fix update issue on MySQL when taget field is in where expression --- Source/EntityFramework.Extended/Batch/MySqlBatchRunner.cs | 4 ++-- .../EntityFramework.Extended.net45.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/EntityFramework.Extended/Batch/MySqlBatchRunner.cs b/Source/EntityFramework.Extended/Batch/MySqlBatchRunner.cs index 7b76fd9..a68d846 100644 --- a/Source/EntityFramework.Extended/Batch/MySqlBatchRunner.cs +++ b/Source/EntityFramework.Extended/Batch/MySqlBatchRunner.cs @@ -310,11 +310,11 @@ private int InternalUpdate(ObjectContext objectContext, EntityMap entit parameter.Value = value; updateCommand.Parameters.Add(parameter); - sqlBuilder.AppendFormat("{0} = @{1}", columnName, parameterName); + sqlBuilder.AppendFormat("j0.{0} = @{1}", columnName, parameterName); } else { - sqlBuilder.AppendFormat("{0} = NULL", columnName); + sqlBuilder.AppendFormat("j0.{0} = NULL", columnName); } } else diff --git a/Source/EntityFramework.Extended/EntityFramework.Extended.net45.csproj b/Source/EntityFramework.Extended/EntityFramework.Extended.net45.csproj index ddf8af6..89e9fa6 100644 --- a/Source/EntityFramework.Extended/EntityFramework.Extended.net45.csproj +++ b/Source/EntityFramework.Extended/EntityFramework.Extended.net45.csproj @@ -30,7 +30,7 @@ pdbonly true bin\Release\ - TRACE + NET45 prompt 4 false