diff --git a/umbraco/cms/businesslogic/datatype/DataType.cs b/umbraco/cms/businesslogic/datatype/DataType.cs index 131408e39f..01dcb79dd1 100644 --- a/umbraco/cms/businesslogic/datatype/DataType.cs +++ b/umbraco/cms/businesslogic/datatype/DataType.cs @@ -31,10 +31,19 @@ namespace umbraco.cms.businesslogic.datatype setupDataTypeDefinition(); } + public override void delete() + { + //delete the cmsDataType role, then the umbracoNode + SqlHelper.ExecuteNonQuery("delete from cmsDataType where nodeId=@nodeId", SqlHelper.CreateParameter("@nodeId", this.Id)); + base.delete(); + + cache.Cache.ClearCacheItem(string.Format("UmbracoDataTypeDefinition{0}", Id)); + } + + [Obsolete("Use the standard delete() method instead")] public void Delete() { delete(); - cache.Cache.ClearCacheItem(string.Format("UmbracoDataTypeDefinition{0}", Id)); } ///