Gets sln building and manually merges the entity/media service changes

This commit is contained in:
Shannon
2018-11-19 17:54:36 +11:00
parent c3736ce7ab
commit 99d9c49c9f
15 changed files with 80 additions and 41 deletions

View File

@@ -11,6 +11,7 @@ using Umbraco.Core.Persistence.DatabaseModelDefinitions;
using Umbraco.Core.Persistence.Dtos;
using Umbraco.Core.Persistence.Querying;
using Umbraco.Core.Persistence.Repositories;
using Umbraco.Core.Persistence.Repositories.Implement;
using Umbraco.Core.Scoping;
namespace Umbraco.Core.Services.Implement
@@ -373,6 +374,22 @@ namespace Umbraco.Core.Services.Implement
}
}
/// <summary>
/// Gets a collection of children by the parent's Id and UmbracoObjectType without adding property data
/// </summary>
/// <param name="parentId">Id of the parent to retrieve children for</param>
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
internal IEnumerable<IEntitySlim> GetMediaChildrenWithoutPropertyData(int parentId)
{
using (ScopeProvider.CreateScope(autoComplete: true))
{
var query = Query<IUmbracoEntity>().Where(x => x.ParentId == parentId);
//fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media
return ((EntityRepository)_entityRepository).GetMediaByQueryWithoutPropertyData(query);
}
}
/// <inheritdoc />
public virtual IEnumerable<IEntitySlim> GetDescendants(int id)
{