Fixes issue with modelsbuilder when doctypes are inheriting from other doc types.
This commit is contained in:
Bjarke Berg
2021-05-06 10:58:45 +02:00
parent 261730f530
commit 205c111dbc
13 changed files with 69 additions and 60 deletions

View File

@@ -12,8 +12,10 @@
/// an original <see cref="IPublishedContent"/> instance.
/// </summary>
/// <param name="content">The original content.</param>
protected PublishedContentModel(IPublishedContent content)
: base(content)
protected PublishedContentModel(IPublishedContent content, IPublishedValueFallback publishedValueFallback)
: base(content, publishedValueFallback)
{ }
}
}

View File

@@ -21,15 +21,18 @@ namespace Umbraco.Cms.Core.Models.PublishedContent
public abstract class PublishedContentWrapped : IPublishedContent
{
private readonly IPublishedContent _content;
private readonly IPublishedValueFallback _publishedValueFallback;
/// <summary>
/// Initialize a new instance of the <see cref="PublishedContentWrapped"/> class
/// with an <c>IPublishedContent</c> instance to wrap.
/// </summary>
/// <param name="content">The content to wrap.</param>
protected PublishedContentWrapped(IPublishedContent content)
/// <param name="publishedValueFallback">The published value fallback.</param>
protected PublishedContentWrapped(IPublishedContent content, IPublishedValueFallback publishedValueFallback)
{
_content = content;
_publishedValueFallback = publishedValueFallback;
}
/// <summary>

View File

@@ -14,8 +14,9 @@
/// an original <see cref="IPublishedElement"/> instance.
/// </summary>
/// <param name="content">The original content.</param>
protected PublishedElementModel(IPublishedElement content)
: base(content)
/// <param name="publishedValueFallback">The published value fallback.</param>
protected PublishedElementModel(IPublishedElement content, IPublishedValueFallback publishedValueFallback)
: base(content, publishedValueFallback)
{ }
}
}

View File

@@ -10,15 +10,18 @@ namespace Umbraco.Cms.Core.Models.PublishedContent
public abstract class PublishedElementWrapped : IPublishedElement
{
private readonly IPublishedElement _content;
private readonly IPublishedValueFallback _publishedValueFallback;
/// <summary>
/// Initializes a new instance of the <see cref="PublishedElementWrapped"/> class
/// with an <c>IPublishedElement</c> instance to wrap.
/// </summary>
/// <param name="content">The content to wrap.</param>
protected PublishedElementWrapped(IPublishedElement content)
/// <param name="publishedValueFallback">The published value fallback.</param>
protected PublishedElementWrapped(IPublishedElement content, IPublishedValueFallback publishedValueFallback)
{
_content = content;
_publishedValueFallback = publishedValueFallback;
}
/// <summary>