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

DocumentModel.refresh() shouldn't fail on not-yet-created doc

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.4
    • Fix Version/s: 5.4.2-RC1, 5.4.2
    • Component/s: None

      Description

      When doing doc.refresh() on a DocumentModel for which session.createDocument has not been called yet, we shouldn't fail.
      The semantics are "update to data saved by other docs" but there are none so it's ok to do nothing.

      org.nuxeo.ecm.core.api.ClientException: Failed to get refresh data
      at org.nuxeo.ecm.core.api.AbstractSession.refreshDocument(AbstractSession.java:3281)
      at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.refresh(DocumentModelImpl.java:1582)
      ...
      Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: org.nuxeo.ecm.core.model.NoSuchDocumentException. message: No such document: No such document: /doc
      at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.resolvePath(SQLSession.java:241)
      at org.nuxeo.ecm.core.api.DocumentResolver.resolveReference(DocumentResolver.java:68)
      at org.nuxeo.ecm.core.api.AbstractSession.resolveReference(AbstractSession.java:523)
      at org.nuxeo.ecm.core.api.AbstractSession.refreshDocument(AbstractSession.java:3254)
      ... 22 more

        Attachments

          Activity

            People

            • Assignee:
              fguillaume Florent Guillaume
              Reporter:
              fguillaume Florent Guillaume
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: