Allows relation types to not have specific object types, updates IRelation to return the actual object types for the ID references, now relations can be more flexible without being strangely tied to specific object types based on the relation type.

This commit is contained in:
Shannon
2019-10-24 21:32:00 +11:00
parent 193892f084
commit ae64fe49be
26 changed files with 248 additions and 105 deletions

View File

@@ -29,8 +29,8 @@ namespace Umbraco.Web.Models.Mapping
target.Path = "-1," + source.Id;
// Set the "friendly" names for the parent and child object types
target.ParentObjectTypeName = ObjectTypes.GetUmbracoObjectType(source.ParentObjectType).GetFriendlyName();
target.ChildObjectTypeName = ObjectTypes.GetUmbracoObjectType(source.ChildObjectType).GetFriendlyName();
target.ParentObjectTypeName = source.ParentObjectType.HasValue ? ObjectTypes.GetUmbracoObjectType(source.ParentObjectType.Value).GetFriendlyName() : string.Empty;
target.ChildObjectTypeName = source.ChildObjectType.HasValue ? ObjectTypes.GetUmbracoObjectType(source.ChildObjectType.Value).GetFriendlyName() : string.Empty;
}
// Umbraco.Code.MapAll -ParentName -ChildName