From 2279e6cc532a3ffb4e22562a96f68f311590db89 Mon Sep 17 00:00:00 2001 From: Claus Date: Tue, 9 Aug 2016 13:39:40 +0200 Subject: [PATCH] U4-8834 Removing code assigning PropertyData IDs for new properties even though it isn't used --- .../Repositories/VersionableRepositoryBase.cs | 11 ----------- .../Models/ContentEditing/ContentPropertyBasic.cs | 6 ++++++ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs index 31ac9d9a9e..44e9349de1 100644 --- a/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs @@ -501,17 +501,6 @@ WHERE EXISTS( var propertyFactory = new PropertyFactory(compositionProperties, def.Version, def.Id, def.CreateDate, def.VersionDate); var properties = propertyFactory.BuildEntity(propertyDataDtos.ToArray()).ToArray(); - var newProperties = properties.Where(x => x.HasIdentity == false && x.PropertyType.HasIdentity); - - foreach (var property in newProperties) - { - var propertyDataDto = new PropertyDataDto { NodeId = def.Id, PropertyTypeId = property.PropertyTypeId, VersionId = def.Version }; - int primaryKey = Convert.ToInt32(Database.Insert(propertyDataDto)); - - property.Version = def.Version; - property.Id = primaryKey; - } - foreach (var property in properties) { //NOTE: The benchmarks run with and without the following code show very little change so this is not a perf bottleneck diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentPropertyBasic.cs b/src/Umbraco.Web/Models/ContentEditing/ContentPropertyBasic.cs index 942766aa40..f317771333 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentPropertyBasic.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ContentPropertyBasic.cs @@ -10,6 +10,12 @@ namespace Umbraco.Web.Models.ContentEditing [DataContract(Name = "property", Namespace = "")] public class ContentPropertyBasic { + /// + /// This is the cmsPropertyData ID + /// + /// + /// This is not really used for anything + /// [DataMember(Name = "id", IsRequired = true)] [Required] public int Id { get; set; }