-
Bug
-
Resolution: Done
-
Medium
-
Montreal Release
-
None
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