mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -1831,20 +1831,24 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
|
||||
// Copy cm:auditable
|
||||
if (!policyBehaviourFilter.isEnabled(node.getNodeRef(), ContentModel.ASPECT_AUDITABLE))
|
||||
{
|
||||
AuditablePropertiesEntity auditableProps = node.getAuditableProperties();
|
||||
if (auditableProps == null)
|
||||
// Only bother if cm:auditable properties are present
|
||||
if (AuditablePropertiesEntity.hasAuditableProperty(newProps.keySet()))
|
||||
{
|
||||
auditableProps = new AuditablePropertiesEntity();
|
||||
AuditablePropertiesEntity auditableProps = node.getAuditableProperties();
|
||||
if (auditableProps == null)
|
||||
{
|
||||
auditableProps = new AuditablePropertiesEntity();
|
||||
}
|
||||
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);
|
||||
nodeUpdate.setUpdateAuditableProperties(true);
|
||||
}
|
||||
boolean containedAuditProperties = auditableProps.setAuditValues(null, null, newProps);
|
||||
if (!containedAuditProperties)
|
||||
{
|
||||
// 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);
|
||||
}
|
||||
|
||||
// Remove cm:auditable
|
||||
|
Reference in New Issue
Block a user