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

Update of top-level container node fails with SQL error

XMLWordPrintable

      Attempting to update a top-level node (under root xpath /) such as 'bookstore' gives an error. For example:

      def json = '{ "bookstore": { "bookstore-name": "new bookstore" }}' cpsDataService.updateDataNodeAndDescendants('dataspace', 'anchor', '/', json, now)

      This results in an SQL error:

      ERROR: insert or update on table "fragment" violates foreign key constraint "fragment_parent_id_fkey"
        Detail: Key (parent_id)=(0) is not present in table "fragment".

      It means the update is trying to set parent_id = 0, where there is no fragment with id = 0

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

              Created:
              Updated:
              Resolved: