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

Fix query used to get template documents with associated document types

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 5.6, 5.8
    • Fix Version/s: 5.9.5
    • Component/s: Renditions

      Description

      This is the query currently used:

      SELECT * FROM Document WHERE tmpl:forcedTypes <> ''
      

      But this query is incorrect because

      • tmpl:forcedTypes is a multivalued property, so if at least one value is different (or null), it will match
      • tmpl:forcedTypes default value is none, and not an empty string or a null value.

      We should use the following query as the correct one

      SELECT * FROM Document WHERE tmpl:forcedTypes/* <> 'none'
      

      Note that the current query returns almost all documents, which could slow Nuxeo startup or raise errors and make the repository initialization fail.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tmartins Thierry Martins
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: