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

Make DocumentModelJsonReader work with properties from schemas without prefix

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4
    • Component/s: Rest API
    • Tags:
    • Sprint:
      TGV 02

      Description

      Setting properties of a schema that does not have prefix fails with a PropertyNotFoundException.

      For instance, creating a Note document through the REST API with the following properties:

      properties: {
        "dc:title": "Test",
        "note:note": "note content"
      }
      

      throws:

      org.nuxeo.ecm.core.api.model.PropertyNotFoundException: Property not found: note
              at org.nuxeo.ecm.core.api.impl.SimpleDocumentModel.getProperty(SimpleDocumentModel.java:269)
              at org.nuxeo.ecm.core.api.impl.SimpleDocumentModel.setPropertyValue(SimpleDocumentModel.java:296)
              at org.nuxeo.ecm.core.io.marshallers.json.document.DocumentModelJsonReader.readEntity(DocumentModelJsonReader.java:108)
              at org.nuxeo.ecm.core.io.marshallers.json.document.DocumentModelJsonReader.readEntity(DocumentModelJsonReader.java:70)
              at org.nuxeo.ecm.core.io.marshallers.json.EntityJsonReader.read(EntityJsonReader.java:63)
              at org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonReader.read(AbstractJsonReader.java:75)
              at org.nuxeo.ecm.core.io.marshallers.json.document.DocumentModelJsonReader.read(DocumentModelJsonReader.java:86)
              at org.nuxeo.ecm.core.io.marshallers.json.document.DocumentModelJsonReader.read(DocumentModelJsonReader.java:70)
              at org.nuxeo.ecm.webengine.jaxrs.coreiodelegate.PartialCoreIODelegate.readFrom(PartialCoreIODelegate.java:121)
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: