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

Emptied multi-value property stored in database

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2023.10
    • Fix Version/s: None
    • Component/s: Core DBS, Core MongoDB

      Description

      The database should not store empty multi-value properties. This causes issues with searches.

      Replication Steps

      1. Create document in Web UI, and add a value for dc:subjects.
      2. Edit document and remove the value.
      3. Export JSON and see e.g.:
        {
          "path": "/config/UserWorkspaces/Administrator/null-1",
          "properties": {
            "dc:subjects": [
            ],
            "dc:title": "null-1",
          },
          "title": "null-1",
          "type": "File",
          "uid": "169d006e-52bd-4e71-858b-6f397a08a902"
        }
        
      4. Export bjson from database (MongoDB here):
        > mongosh
        test> use nuxeo
        nuxeo> db.default.find({'ecm:id': '169d006e-52bd-4e71-858b-6f397a08a902'})
        [
          {
            _id: ObjectId("66d8570bc84cbc6f56e26713"),
            ...
            'dc:subjects': [],
            ...
          }
        ]
        
      5. Search for document (using Web UI NXQL Admin Tool, i.e. against db):
        SELECT * FROM File WHERE dc:title = 'null-1' AND dc:subjects IS NULL
        
        •  Expected result:
          Found document: null-1
          
        • Actual result:
          No documents match the search criteria.
          

      Issue observed on 2023.7.9 and 2023.10.13

      Note:

      • This issue arises from a MV property that has had a value set and then removed. It does not affect properties that have never been set.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              msaye Mark Saye
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: