From 1613307f26a9d9a8e5733e4acaecaefafb200c48 Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@qq.com> Date: Thu, 29 Dec 2022 16:23:21 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BC=98=E5=8C=96=20JsonMap=20=E5=AF=B9?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=97=A0=E6=95=88?= =?UTF-8?q?=E5=88=A4=E6=96=AD=EF=BC=9B#1385?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Extensions/FreeSql.Extensions.JsonMap/JsonMapCore.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Extensions/FreeSql.Extensions.JsonMap/JsonMapCore.cs b/Extensions/FreeSql.Extensions.JsonMap/JsonMapCore.cs index 25ab7407..12ca516d 100644 --- a/Extensions/FreeSql.Extensions.JsonMap/JsonMapCore.cs +++ b/Extensions/FreeSql.Extensions.JsonMap/JsonMapCore.cs @@ -53,6 +53,9 @@ public static class FreeSqlJsonMapCoreExtensions var isJsonMap = e.Property.GetCustomAttributes(typeof(JsonMapAttribute), false).Any() || _dicJsonMapFluentApi.TryGetValue(e.EntityType, out var tryjmfu) && tryjmfu.ContainsKey(e.Property.Name); if (isJsonMap) { + if (FreeSql.Internal.Utils.dicExecuteArrayRowReadClassOrTuple.ContainsKey(e.Property.PropertyType)) + return; //基础类型使用 JsonMap 无效 + e.ModifyResult.MapType = typeof(string); e.ModifyResult.StringLength = -2; if (_dicTypes.TryAdd(e.Property.PropertyType, true))