AnsweredAssumed Answered

Is it possible to put a HashMap as property value in a node?

Question asked by turgayz on Sep 27, 2006
Latest reply on Sep 28, 2006 by andy
I want to put a HashMap in a property value, is this possible?
I am doing the following and getting an exception:


<property name="parameters">
when I try to add an aspect containing this property:

Map parameterMap = new HashMap();
parameterMap.put("key1", "value1");

aspectProperties.put(Model.PROP_PARAMETERS, parameterMap );

nodeService.addAspect(spaceRef, Model.ASPECT_AN_ASPECT, aspectProperties);
I get this exception:

ERROR [util.transaction.SpringAwareUserTransaction] Transaction didn't commit
org.alfresco.service.cmr.repository.datatype.TypeConversionException: There is no conversion registered for the value:
   value class: java.util.HashMap
   to class: java.lang.String
   value: {key1=value1}