CPS-594: Exception when updating list node PATCH 29/124229/9
authorDylanB95EST <dylan.byrne@est.tech>
Wed, 29 Sep 2021 12:44:53 +0000 (13:44 +0100)
committerDylanB95EST <dylan.byrne@est.tech>
Wed, 29 Sep 2021 12:44:53 +0000 (13:44 +0100)
commit8bf710c85d26ddd4586554868473b070ca68a70c
tree28e9dd1dce1410e46618a7e7379f948bee3084c7
parentfdcb36fa9db642df3c47637d32f4e7ac5dd347e8
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 <luke.gleeson@est.tech>
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
Change-Id: Idbf580fab05581513b52327d6895b9e39b4cf470
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceServiceIntegrationSpec.groovy
cps-ri/src/test/resources/data/fragment.sql