Correcting the update of the cmsContentVersion table so the UpdateDate is updated properly

This commit is contained in:
Morten Christensen
2013-08-30 17:24:42 +02:00
parent 5d5c25f0e4
commit 0196afa12a

View File

@@ -289,6 +289,9 @@ namespace Umbraco.Core.Persistence.Repositories
Database.Update(newContentDto);
}
//In order to update the ContentVersion we need to retreive its primary key id
var contentVerDto = Database.SingleOrDefault<ContentVersionDto>("WHERE VersionId = @Version", new { Version = entity.Version });
dto.Id = contentVerDto.Id;
//Updates the current version - cmsContentVersion
//Assumes a Version guid exists and Version date (modified date) has been set/updated
Database.Update(dto);