-
Bug
-
Resolution: Done
-
Oxygen, Nitrogen SR1, Carbon SR2
-
None
-
Operating System: All
Platform: All
-
5826
If you use a leaf from grouping of type union as a key in list, binding generates key class without that leaf as part of key.
grouping common-cars { leaf brand { type union { type uint64; type string; } } leaf engine { type string; } leaf gearbox { type string; } } container cars { list car { key "brand"; uses common-cars; } }
From this yang we get empty key binding class
public class CarKey implements Identifier<Car> { private static final long serialVersionUID = -7229666078144872030L; public CarKey() { } }
Simple workaround is to not use grouping. You can also define your own type with the appropriate union type as the base type and use this new type as a type for leaf in grouping.
- is blocked by
-
MDSAL-237 Milestone: Implement Binding Specification - Java v2
- Resolved