-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 6.0-HF11
-
Component/s: Core MongoDB
-
Tags:
When updating a schema an turning a field from String to StringList, it raises a ClassCast exception when reading an existing document.
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.Object; at org.nuxeo.ecm.core.storage.dbs.DBSDocument.readComplexProperty(DBSDocument.java:781) at org.nuxeo.ecm.core.storage.dbs.DBSDocument.readDocumentPart(DBSDocument.java:742) at org.nuxeo.ecm.core.api.DocumentModelFactory.createDataModel(DocumentModelFactory.java:235) at org.nuxeo.ecm.core.api.AbstractSession.getDataModel(AbstractSession.java:2357) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$1.run(DocumentModelImpl.java:475) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$1.run(DocumentModelImpl.java:472) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$RunWithCoreSession.execute(DocumentModelImpl.java:389) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.loadDataModel(DocumentModelImpl.java:472) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getDataModel(DocumentModelImpl.java:486) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getPart(DocumentModelImpl.java:1342)
–
When using MongoDB storage, it is now possible to change a schema from a scalar value to an array without any trouble.