Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-17034

Accept schema update from String to StringList

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0-HF11
    • Fix Version/s: 6.0-HF22, 6.0-HF36, 7.10
    • Component/s: Core MongoDB

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: