Ensure that all automatic relation types are updated (#13470)

This commit is contained in:
Mole
2022-11-28 12:49:14 +01:00
committed by Nikolaj
parent c88ac85861
commit c9a97984f4
3 changed files with 32 additions and 5 deletions

View File

@@ -344,7 +344,6 @@ public static partial class Constants
/// Developers should not manually use these relation types since they will all be cleared whenever an entity
/// (content, media or member) is saved since they are auto-populated based on property values.
/// </remarks>
[Obsolete("This is no longer used, and will be removed in v12")]
public static string[] AutomaticRelationTypes { get; } = { RelatedMediaAlias, RelatedDocumentAlias };
// TODO: return a list of built in types so we can use that to prevent deletion in the UI

View File

@@ -14,4 +14,10 @@ public interface IDataValueReference
/// <param name="value"></param>
/// <returns></returns>
IEnumerable<UmbracoEntityReference> GetReferences(object? value);
/// <summary>
/// Returns all reference types that are automatically tracked.
/// </summary>
/// <returns></returns>
IEnumerable<string> GetAutomaticRelationTypesAliases() => Enumerable.Empty<string>();
}