Added releaseDate, expireDate columns to the query defined on m_SQLOptimizedMany so the corresponding fields are populated when this query is used to load the object.

This commit is contained in:
callicj
2012-10-07 11:28:43 -02:00
parent a71f3f8412
commit 40a413cd70

View File

@@ -185,7 +185,7 @@ namespace umbraco.cms.businesslogic.web
select count(children.id) as children, umbracoNode.id, umbracoNode.uniqueId, umbracoNode.level, umbracoNode.parentId,
cmsDocument.documentUser, coalesce(cmsDocument.templateId, cmsDocumentType.templateNodeId) as templateId,
umbracoNode.path, umbracoNode.sortOrder, coalesce(publishCheck.published,0) as isPublished, umbracoNode.createDate,
cmsDocument.text, cmsDocument.updateDate, cmsContentVersion.versionDate, cmsContentType.icon, cmsContentType.alias,
cmsDocument.text, cmsDocument.updateDate, cmsContentVersion.versionDate, cmsDocument.releaseDate, cmsDocument.expireDate, cmsContentType.icon, cmsContentType.alias,
cmsContentType.thumbnail, cmsContentType.description, cmsContentType.masterContentType, cmsContentType.nodeId as contentTypeId,
umbracoNode.nodeUser
from umbracoNode
@@ -202,7 +202,7 @@ namespace umbraco.cms.businesslogic.web
cmsDocument.templateId, cmsDocumentType.templateNodeId, umbracoNode.path, umbracoNode.sortOrder,
coalesce(publishCheck.published,0), umbracoNode.createDate, cmsDocument.text,
cmsContentType.icon, cmsContentType.alias, cmsContentType.thumbnail, cmsContentType.description,
cmsContentType.masterContentType, cmsContentType.nodeId, cmsDocument.updateDate, cmsContentVersion.versionDate, umbracoNode.nodeUser
cmsContentType.masterContentType, cmsContentType.nodeId, cmsDocument.updateDate, cmsContentVersion.versionDate, cmsDocument.releaseDate, cmsDocument.expireDate, umbracoNode.nodeUser
order by {1}
";
@@ -1697,6 +1697,11 @@ namespace umbraco.cms.businesslogic.web
, masterContentType
, dr.GetInt("contentTypeId")
, dr.GetInt("templateId"));
if (!dr.IsNull("releaseDate"))
_release = dr.GetDateTime("releaseDate");
if (!dr.IsNull("expireDate"))
_expire = dr.GetDateTime("expireDate");
}
protected void SaveXmlPreview(XmlDocument xd)