Due to legacy reasons, the following snippet:
ends up being mapped as this:
which ends up being nasty for multiple reasons:
- default order-by is "system", yet we are married to order-dependent List.equals(), yet
- the BI layer will interpret this as a freely-reorderable Map
- there is no provision to look up elements by their key and hence users must perform linear searches
The mapping for keyed lists with "order-by system", the mapping should result in the following:
which properly captures the contract here, binding use to Map.equals(). Note that unkeyed lists must not be affected, nor should the "order-by user" lists be changed.
For dealing with user-ordered lists we will need a custom interface, which is an extension of List and provides a secondary map-like lookups, still deriving equality from List.equals().