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

Update automation doc for AddFacet, RemoveFacet and ResetSchema to explicitly state the document is saved by default

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.10-HF22, 11.1-SNAPSHOT
    • Fix Version/s: 10.10-HF23, 11.1
    • Component/s: Automation

      Description

      Operations whose documentation must be updated in the Java code:

      • Document.ResetSchema
      • Document.AddFacet
      • Document.RemoveFacet

      Problem is when you use one of these in aboutToCreate or beforeDocumentModification. As the java code saves the document by default, for compatibility reason (it was the original implementation before the parameters were added), using default default values :=> document is saved => this fails miserably for these events.

      Notice AddFacet and RemoveFacet already explains the issue but don't mention the value is true by default, they just state that "Save parameter automatically saves the document in the database [...]".

      Another way to handle that would be to detect we are in the context of these listeners and then don't save. First fix: let the developer handles this.

      It is major and high backlog priority because it is very confusing and quite hard to debug/understand for prospects discovering Nuxeo.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.