From ea71bef75b22c31a4b40a3cacbf5da2ddecb544b Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Fri, 14 Jul 2023 13:09:41 +0100 Subject: Allow duplicate leaf names in Cps Path leaf condition Presently, a query using the same leaf name twice will fail: //books[@price > 10 and @price < 20] It is caused by storing data leaves in a Map. This is fixed by storing data leaves in a List. Issue-ID: CPS-1779 Signed-off-by: danielhanrahan Change-Id: Ie6990ea5e622cf37e986b720a0a07fb69ce4f03b --- .../resources/data/bookstore/bookstoreData.json | 78 +++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) (limited to 'integration-test/src/test/resources/data/bookstore/bookstoreData.json') diff --git a/integration-test/src/test/resources/data/bookstore/bookstoreData.json b/integration-test/src/test/resources/data/bookstore/bookstoreData.json index 12df20e55..5d22f6d67 100644 --- a/integration-test/src/test/resources/data/bookstore/bookstoreData.json +++ b/integration-test/src/test/resources/data/bookstore/bookstoreData.json @@ -27,7 +27,7 @@ "lang": "English", "authors": ["Roald Dahl"], "editions": [1988, 2000], - "price": 10 + "price": 20 }, { "title": "The Gruffalo", @@ -104,6 +104,82 @@ "price": 11 } ] + }, + { + "code": 5, + "name": "Discount books", + "books" : [ + { + "title": "Book 1", + "lang": "blah", + "authors": [], + "editions": [], + "price": 1 + }, + { + "title": "Book 2", + "lang": "blah", + "authors": [], + "editions": [], + "price": 2 + }, + { + "title": "Book 3", + "lang": "blah", + "authors": [], + "editions": [], + "price": 3 + }, + { + "title": "Book 4", + "lang": "blah", + "authors": [], + "editions": [], + "price": 4 + }, + { + "title": "Book 5", + "lang": "blah", + "authors": [], + "editions": [], + "price": 5 + }, + { + "title": "Book 6", + "lang": "blah", + "authors": [], + "editions": [], + "price": 6 + }, + { + "title": "Book 7", + "lang": "blah", + "authors": [], + "editions": [], + "price": 7 + }, + { + "title": "Book 8", + "lang": "blah", + "authors": [], + "editions": [], + "price": 8 + }, + { + "title": "Book 9", + "lang": "blah", + "authors": [], + "editions": [], + "price": 9 + }, + { + "title": "Book 10", + "lang": "blah", + "authors": [], + "editions": [], + "price": 10 + } + ] } ] } -- cgit 1.2.3-korg