Is it possible to put a HashMap as property value in a node?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2006 04:01 AM
Hi,
I want to put a HashMap in a property value, is this possible?
I am doing the following and getting an exception:
Model:
I want to put a HashMap in a property value, is this possible?
I am doing the following and getting an exception:
Model:
<property name="parameters"> <title>Parameters</title> <type>d:any</type></property>
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 commitorg.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}
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2006 11:19 AM
Hi
Type d:any can contain any serializable value.
For this value to be indexed there must be a way to convert this to a Collection of Strings. This would mean adding a converter.
Regards
Andy
Type d:any can contain any serializable value.
For this value to be indexed there must be a way to convert this to a Collection of Strings. This would mean adding a converter.
Regards
Andy