[MDSAL-655] Binding Query - Provide wrong data if result included also parent directory Created: 25/Jan/21 Updated: 25/Jan/21 Resolved: 25/Jan/21 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | Peter Suna | Assignee: | Robert Varga |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
When is used binding query to filter data, but results required also parents directory. Then filter conditions are not applied.
final QueryExpression<System> query = factory.querySubtree(InstanceIdentifier.create(Foo.class))
.extractChild(System.class, new SystemKey("first"))
.matching()
.childObject(Alarms.class)
.leaf(Alarms::getId).valueEquals(Uint64.ZERO)
.build();
Then the result will include also Alarms with values other than uint64.ZERO.
|
| Comments |
| Comment by Peter Suna [ 25/Jan/21 ] |
|
Misunderstand how should matching in binding query works. In this case it returns System object if it contains Alarms object with id=ZERO. Not System object with only Alarms objects with id=ZERO, |