Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-1765

CpsDataService is saving data nodes with non-normalized xpaths

XMLWordPrintable

      When saving data nodes using:

      saveData(dataspaceName, anchorName, parentNodeXpath, nodeData, observedTimestamp)

      The parentNodeXpath is not normalized. This results in data nodes being written to the database in a non-normal form, meaning those nodes cannot be operated on at all - this affects all operations like get, query, update, delete.

      For example, if saveData is called like this:

      notNormalizedParentXpath = '/bookstore/categories[ @code="1"]'
      json = '"books" : [ { "title": "New Book" } ]'
      saveData(dataspaceName, anchorName, notNormalizedParentXpath, json, now);

      The fragment will be written to the DB with xpath:

      /bookstore/categories[ @code="1"]/books[@title='New Book']

            danielhanrahan Daniel Hanrahan
            danielhanrahan Daniel Hanrahan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: