cancel
Showing results for 
Search instead for 
Did you mean: 

Custom model property change to multiple values

ajansen
Champ in-the-making
Champ in-the-making
Hi,

We need to change a property of our Custom content model from a single value field to a multiple value field. So the line in bold we want to add to the model.

   <property name="mn:territory">
      <title>Territory</title>
      <type>d:category</type>
                  <multiple>true</multiple>

   </property>

For any new item this is working OK, but the previously created items it is giving an error:

javax.faces.FacesException: org.alfresco.service.cmr.repository.NodeRef
caused by:
org.apache.jasper.JasperException: org.alfresco.service.cmr.repository.NodeRef
caused by:
java.lang.ClassCastException: org.alfresco.service.cmr.repository.NodeRef

Our question is:
- Is it possible to modify a property to multiple values ?
- If so, how to migrate the old nodes ?
- Or is there another way to upgrade the model?

The Alfresco version we use is 2.1

Thanks in advance
1 REPLY 1

davidc
Star Contributor
Star Contributor
That kind of model change is not supported out-of-the-box.  You'll have to migrate existing data.  You can do so by writing a patch (java) to read properties as if they're single valued and write them back as multi-valued.