mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix SAIL-389 (SAIL-294): NodeDAO: single-valued, d:any properties don't handle increasing array values
- Incorrect translation of raw values back to Serializable for cache purposes - Addition of Savepoint around alf_node insert git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21136 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1892,6 +1892,40 @@ public abstract class BaseNodeServiceTest extends BaseSpringTest
|
||||
assertEquals("MLText collection didn't come back correctly.", mlTextCollection, mlTextCollectionCheck);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that d:any types are handled correctly when adding values
|
||||
*/
|
||||
public void testMultivaluedSerializable() throws Exception
|
||||
{
|
||||
ArrayList<String> listProp = new ArrayList<String>();
|
||||
|
||||
listProp.clear();
|
||||
nodeService.addProperties(
|
||||
rootNodeRef,
|
||||
Collections.singletonMap(PROP_QNAME_ANY_PROP_MULTIPLE, (Serializable) listProp));
|
||||
listProp.add("ONE");
|
||||
nodeService.addProperties(
|
||||
rootNodeRef,
|
||||
Collections.singletonMap(PROP_QNAME_ANY_PROP_MULTIPLE, (Serializable) listProp));
|
||||
listProp.add("TWO");
|
||||
nodeService.addProperties(
|
||||
rootNodeRef,
|
||||
Collections.singletonMap(PROP_QNAME_ANY_PROP_MULTIPLE, (Serializable) listProp));
|
||||
|
||||
listProp.clear();
|
||||
nodeService.addProperties(
|
||||
rootNodeRef,
|
||||
Collections.singletonMap(PROP_QNAME_ANY_PROP_SINGLE, (Serializable) listProp));
|
||||
listProp.add("ONE");
|
||||
nodeService.addProperties(
|
||||
rootNodeRef,
|
||||
Collections.singletonMap(PROP_QNAME_ANY_PROP_SINGLE, (Serializable) listProp));
|
||||
listProp.add("TWO");
|
||||
nodeService.addProperties(
|
||||
rootNodeRef,
|
||||
Collections.singletonMap(PROP_QNAME_ANY_PROP_SINGLE, (Serializable) listProp));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the {@link ContentModel#ASPECT_REFERENCEABLE referencable} properties
|
||||
* are present
|
||||
|
Reference in New Issue
Block a user