Fixes for cm:auditable and properties fallout

- Deleted nodes were getting cm:auditable aspect
 - Added Savepoint around try-catch logic for store-move code (secondary PostgreSQL fallout from above)
 - Use cached Node properties (not query) as starting point when modifying node properties


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20819 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-06-25 12:57:55 +00:00
parent a950466a8e
commit b6441e0987
2 changed files with 45 additions and 58 deletions

View File

@@ -278,13 +278,13 @@ public class NodePropertyValue implements Cloneable, Serializable
@Override
protected ValueType getPersistedType(Serializable value)
{
if (value instanceof Long)
if (value instanceof ContentData)
{
return ValueType.LONG;
return ValueType.SERIALIZABLE;
}
else
{
return ValueType.STRING;
throw new RuntimeException("ContentData persistence must be by ContentDataId.");
}
}
@@ -295,6 +295,11 @@ public class NodePropertyValue implements Cloneable, Serializable
{
return value;
}
else if (value instanceof String)
{
logger.warn("Content URL converter has not run to completion: " + value);
return DefaultTypeConverter.INSTANCE.convert(ContentData.class, value);
}
else
{
return DefaultTypeConverter.INSTANCE.convert(ContentData.class, value);