adds fixme note

This commit is contained in:
Shannon
2019-07-02 12:04:58 +10:00
parent f81588bb13
commit 4134dd16df

View File

@@ -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);