Fixes ContentService fix for issue U4-1772, we don't want to truncate! Plus the truncate term doesn't work in SQLCE anyways.

This commit is contained in:
Shannon Deminick
2013-04-25 19:33:53 -10:00
parent 7fc4822bbe
commit 153fe248a7

View File

@@ -1096,9 +1096,11 @@ namespace Umbraco.Core.Services
{
if (!contentTypeIds.Any())
{
//since we're updating all records, it will be much faster to just clear the table first
uow.Database.TruncateTable("cmsContentXml");
//Remove all Document records from the cmsContentXml table (DO NOT REMOVE Media/Members!)
uow.Database.Execute(@"DELETE FROM cmsContentXml WHERE nodeId IN
(SELECT DISTINCT cmsContentXml.nodeId FROM cmsContentXml
INNER JOIN cmsDocument ON cmsContentXml.nodeId = cmsDocument.nodeId)");
//get all content items that are published
// Consider creating a Path query instead of recursive method:
// var query = Query<IContent>.Builder.Where(x => x.Path.StartsWith("-1"));