Fixed cm:auditable setting not being pushed the DB

- Changes were being put into the cache but missing an update trigger to push to the DB
 - Fixes ALF-10224: Test disabled: GetChildrenCannedQueryTest.testPropertySorting


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30386 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2011-09-09 13:37:35 +00:00
parent 06fcddedc1
commit 62ea9bf571

View File

@@ -1830,6 +1830,9 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
// Copy cm:auditable
if (!policyBehaviourFilter.isEnabled(node.getNodeRef(), ContentModel.ASPECT_AUDITABLE))
{
// Only bother if cm:auditable properties are present
if (AuditablePropertiesEntity.hasAuditableProperty(newProps.keySet()))
{
AuditablePropertiesEntity auditableProps = node.getAuditableProperties();
if (auditableProps == null)
@@ -1839,12 +1842,13 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
boolean containedAuditProperties = auditableProps.setAuditValues(null, null, newProps);
if (!containedAuditProperties)
{
// Double-check (previous hasAuditableProperty should cover it)
// The behaviour is disabled, but no audit properties were passed in
auditableProps = null;
}
nodeUpdate.setAuditableProperties(auditableProps);
// We DON'T set the update flag because the update depends on the aspect being enabled, etc.
// nodeUpdate.setUpdateAuditableProperties(true);
nodeUpdate.setUpdateAuditableProperties(true);
}
}
// Remove cm:auditable