From 4134dd16df02151ced2bb566c284b87b9ec8ec15 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 2 Jul 2019 12:04:58 +1000 Subject: [PATCH] adds fixme note --- src/Umbraco.Web/Models/Mapping/ContentPropertyBasicMapper.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Umbraco.Web/Models/Mapping/ContentPropertyBasicMapper.cs b/src/Umbraco.Web/Models/Mapping/ContentPropertyBasicMapper.cs index 8340d24032..57a06c2175 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentPropertyBasicMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentPropertyBasicMapper.cs @@ -51,6 +51,8 @@ namespace Umbraco.Web.Models.Mapping dest.PropertyEditor = editor; dest.Editor = editor.Alias; + //fixme: although this might get cached, if a content item has 100 properties of different data types, then this means this is going to be 100 extra DB queries :( :( :( + // - ideally, we'd just have the DataTypeKey alongside the DataTypeId which is loaded in the single sql statement which should be relatively easy. var dataTypeKey = _entityService.GetKey(property.PropertyType.DataTypeId, UmbracoObjectTypes.DataType); if (!dataTypeKey.Success) throw new InvalidOperationException("Can't get the unique key from the id: " + property.PropertyType.DataTypeId);