This commit is contained in:
2881099
2023-01-24 11:15:00 +08:00
parent c6f0e4455f
commit f68f7d8277
32 changed files with 78 additions and 35 deletions

View File

@ -53,7 +53,8 @@ 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))
if (_dicTypes.ContainsKey(e.Property.PropertyType) == false &&
FreeSql.Internal.Utils.dicExecuteArrayRowReadClassOrTuple.ContainsKey(e.Property.PropertyType))
return; //基础类型使用 JsonMap 无效
e.ModifyResult.MapType = typeof(string);