[MDSAL-376] Keyed list entry builder should cross-reference keys and their constituents Created: 10/Oct/18 Updated: 03/Aug/20 |
|
| Status: | Confirmed |
| Project: | mdsal |
| Component/s: | Binding codegen |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Lowest |
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Given the simple model:
list lst {
key key;
leaf key {
type string;
}
}
generated entry lifecycle is a bit weird, as it is possible to create a Lst which has a mis-matching key() and getKey(). This is because key() is a separate "property", as that allows sharing a single object across copies - but key constituents are not cross-referenced so that the key is reset when a conflicting leaf is stored. Design and implement an efficient way of cross-referencing the two, so that users do not get surprises. |
| Comments |
| Comment by Robert Varga [ 10/Oct/18 ] |
|
Current codegen prefers the values captured in the key, i.e. Builder fields for them are not consulted if the key is present. |