From 8bf710c85d26ddd4586554868473b070ca68a70c Mon Sep 17 00:00:00 2001 From: DylanB95EST Date: Wed, 29 Sep 2021 13:44:53 +0100 Subject: CPS-594: Exception when updating list node PATCH SQL ConstraintViolationException updating the list node element using PATCH List node API - Took advantage of replaceDataNodeTree to replace list node children recursively - Added functionality to exclude the updated dataNodes when removing the list node descendants Issue-ID: CPS-594 Signed-off-by: lukegleeson Signed-off-by: DylanB95EST Change-Id: Idbf580fab05581513b52327d6895b9e39b4cf470 Signed-off-by: DylanB95EST --- cps-ri/src/test/resources/data/fragment.sql | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cps-ri/src/test/resources/data') diff --git a/cps-ri/src/test/resources/data/fragment.sql b/cps-ri/src/test/resources/data/fragment.sql index 886e6e175..f6e887e01 100755 --- a/cps-ri/src/test/resources/data/fragment.sql +++ b/cps-ri/src/test/resources/data/fragment.sql @@ -61,4 +61,11 @@ INSERT INTO FRAGMENT (ID, DATASPACE_ID, ANCHOR_ID, PARENT_ID, XPATH, ATTRIBUTES) (4215, 1001, 3003, 4214, '/parent-203/child-203', '{}'), (4216, 1001, 3003, 4214, '/parent-203/child-204[@key="A"]', '{"key": "A"}'), (4217, 1001, 3003, 4214, '/parent-203/child-204[@key="X"]', '{"key": "X"}'), - (4218, 1001, 3003, 4217, '/parent-203/child-204[@key="X"]/grand-child-204[@key2="Y"]', '{"key": "X", "key2": "Y"}'); \ No newline at end of file + (4218, 1001, 3003, 4217, '/parent-203/child-204[@key="X"]/grand-child-204[@key2="Y"]', '{"key": "X", "key2": "Y"}'), + (4219, 1001, 3003, null, '/parent-204[@key="L"]', '{"key": "L"}'), + (4220, 1001, 3003, 4219, '/parent-204[@key="L"]/child-210[@key="M"]', '{"key": "M"}'), + (4221, 1001, 3003, null, '/parent-205', '{"leaf-value": "original"}'), + (4222, 1001, 3003, 4221, '/parent-205/child-205', '{}'), + (4223, 1001, 3003, 4221, '/parent-205/child-205[@key="X"]', '{"key": "X"}'), + (4224, 1001, 3003, 4223, '/parent-205/child-205[@key="X"]/grand-child-206[@key="Y"]', '{"key": "Y", "key2": "Z"}'), + (4225, 1001, 3003, 4223, '/parent-205/child-205[@key="X"]/grand-child-206[@key="Y" and @key2="Z"]', '{"key": "Y", "key2": "Z"}'); \ No newline at end of file -- cgit 1.2.3-korg