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

Fix storage of default values in the database

    XMLWordPrintable

    Details

    • Release Notes Summary:
      Default values are persisted in the database.
    • Tags:
    • Backlog priority:
      700
    • Sprint:
      nxcore 11.1.1
    • Story Points:
      5

      Description

      When a document is created without setting a value for a field with a default value, this value is not written in the database, unless the field belongs to a schema with other dirty fields.

      The consequence is that NXQL searches on this field won't return the expected documents because this field is actually empty/null.

      Example;

      • this NXQL query does not return the document, whereas it should
        SELECT * FROM Document WHERE schema:field = 'foo'
      • this NXQL query do return the document, whereas it should not
        SELECT * FROM Document WHERE schema:field IS NULL

      Not that the first query run against Elasticsearch will return the document because it's the DocumentModel with the default value which is indexed.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours
                  5h