-
Bug
-
Resolution: Duplicate
-
Medium
-
London Release
-
None
Using the bookstore model, queryDataNodes returns nothing in this case:
cpsQueryService.queryDataNodes(FUNCTIONAL_TEST_DATASPACE, BOOKSTORE_ANCHOR, '/bookstore/categories[@code=1]', INCLUDE_ALL_DESCENDANTS)
(regardless of fetchDescendantsOption.)
Meanwhile, getDataNodes returns correct data:
cpsDataService.getDataNodes(FUNCTIONAL_TEST_DATASPACE, BOOKSTORE_ANCHOR, '/bookstore/categories[@code=1]', INCLUDE_ALL_DESCENDANTS)
returns:
- /bookstore/categories[@code='1']
- /bookstore/categories[@code='1']/books[@title='Matilda']
- /bookstore/categories[@code='1']/books[@title='The Gruffalo']
Difference of integer/string leaf value
In the bookstore.yang model, categories key is defined as "code" attribute:
list categories {
key "code";
leaf code {
type string;
}
...
So using a string leaf value returns correct results:
/bookstore/categories[@code="1"]
while this returns nothing:
/bookstore/categories[@code=1]
However, both these queries return same results:
/bookstore/categories[@code=1]/books[@title="Matilda"]
/bookstore/categories[@code="1"]/books[@title="Matilda"]
Not to mention getDataNodes returns same results for these:
/bookstore/categories[@code=1]
/bookstore/categories[@code="1"]
- duplicates
-
CPS-1607 Correct documentation for GET node API
- Closed