Details
-
Bug
-
Status: Closed
-
Medium
-
Resolution: Done
-
London Release
Description
Grooming update :
Module X declare Container A, child container B
Module X imports Module Y
Module Y declares Container C, child container D
A
+B
+C
+D
XPath without prefix /A/B/C/D
Our current solution, only adds very first Module Prefix: X:A/B/C/D but in a very inefficient manner
Future (proper) solution should had at each module chance a prefix: X:A/B/Y:C/D
Scope of bug-fix: Fix the performance issue by decouple the SQL-Query for all fragments form the implementation to get the prefix for the TOP level Fragment
A/C
- Functionality unchanged, see scenarios 1 & 2 below
- De-coupling can only be checked as code-review
Out of scope
- Insertion of prefix for different modules (separate: Jira
CPS-1301)
Scenario 1. get for actual top-level container (with children). Note the insertoint of 'stores:' prefix (only for bookstore)
{ "stores:bookstore": { "bookstore-name": "Easons", "staff": { "manager": "John Smith", "members": [ { "name": "Some Guy" }, { "name": "Another Person" } ] }, "inventory": { "categories": [ { "code": 2, "name": "/TIMER.TIMER/TIMER", "numberOfBooks": 1, "books": [ { "title": "Matilda" } ] }, { "code": 1, "name": "/DAL.DAL/DA", "numberOfBooks": 2 } ] } } }
Scenario 2. get for any child-container (with children). Note the insertion of 'stores:' prefix (only for 'inventory')
{ "stores:inventory": { "categories": [ { "code": 2, "name": "/TIMER.TIMER/TIMER", "numberOfBooks": 1, "books": [ { "title": "Matilda" } ] }, { "code": 1, "name": "/DAL.DAL/DA", "numberOfBooks": 2 } ] } }