Based on hybris documentation https://wiki.hybris.com/pages/viewpage.action?title=Type+System+Documentation&spaceKey=release5#Type... there should be a SortedSet for ordered relations:
CollectionTypes are based on the Java Collection class. Via the type attribute in a CollectionType's definition, you can make use of the Collection class and some of its subclasses (List, Set, and SortedSet). A Collection is a list of elements. A List is a number of ordered items. Although there may be equal items in a List, the items' order is relevant. Items in a List may be accessed by an index counter. A Set is an unordered number of items that must all be unique, no two items may be equal. A SortedSet is the combination ot a List and a Set. It contains a number of ordered items that must all be unique.
The items definition of the sourceElement looks like this:
<sourceElement type="ClassAttributeAssignment" qualifier="namegenClassAttributeAssignments"
cardinality="many" collectiontype="list" ordered="true">
I would expect to get a SortedSet, but the return type but i get:
How to get a SortedSet?