updates deep clone to have the false flag for resetting properties (we don't want to remember them when cloning)
Conflicts: src/Umbraco.Core/Models/Member.cs
This commit is contained in:
@@ -442,7 +442,7 @@ namespace Umbraco.Core.Models
|
||||
|
||||
//need to manually clone this since it's not settable
|
||||
clone._contentType = (IContentType)ContentType.DeepClone();
|
||||
clone.ResetDirtyProperties(true);
|
||||
clone.ResetDirtyProperties(false);
|
||||
|
||||
return clone;
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ namespace Umbraco.Core.Models
|
||||
//need to manually assign since this is an internal field and will not be automatically mapped
|
||||
clone.RemovedContentTypeKeyTracker = new List<int>();
|
||||
clone._contentTypeComposition = ContentTypeComposition.Select(x => (IContentTypeComposition)x.DeepClone()).ToList();
|
||||
clone.ResetDirtyProperties(true);
|
||||
clone.ResetDirtyProperties(false);
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ namespace Umbraco.Core.Models.EntityBase
|
||||
var clone = (Entity)MemberwiseClone();
|
||||
//Automatically deep clone ref properties that are IDeepCloneable
|
||||
DeepCloneHelper.DeepCloneRefProperties(this, clone);
|
||||
clone.ResetDirtyProperties(true);
|
||||
clone.ResetDirtyProperties(false);
|
||||
return clone;
|
||||
|
||||
//Using data contract serializer - has issues
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace Umbraco.Core.Models
|
||||
clone._alias = Alias;
|
||||
clone._name = Name;
|
||||
|
||||
clone.ResetDirtyProperties(true);
|
||||
clone.ResetDirtyProperties(false);
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
@@ -641,7 +641,7 @@ namespace Umbraco.Core.Models
|
||||
|
||||
//need to manually clone this since it's not settable
|
||||
clone._contentType = (IMemberType)ContentType.DeepClone();
|
||||
clone.ResetDirtyProperties(true);
|
||||
clone.ResetDirtyProperties(false);
|
||||
|
||||
return clone;
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace Umbraco.Core.Models
|
||||
|
||||
//need to manually assign since this is a readonly property
|
||||
clone._propertyType = (PropertyType)PropertyType.DeepClone();
|
||||
clone.ResetDirtyProperties(true);
|
||||
clone.ResetDirtyProperties(false);
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ namespace Umbraco.Core.Models
|
||||
clone._propertyGroupId = new Lazy<int>(() => propGroupId);
|
||||
}
|
||||
|
||||
clone.ResetDirtyProperties(true);
|
||||
clone.ResetDirtyProperties(false);
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ namespace Umbraco.Core.Models
|
||||
clone._alias = Alias;
|
||||
clone._name = Name;
|
||||
|
||||
clone.ResetDirtyProperties(true);
|
||||
clone.ResetDirtyProperties(false);
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user