Don't use `List` here. You can still use `Set`. Remember that `Set` doesn't mean that the elements are unordered; `Set` means that the elements are unique. It's just `HashSet` that is unordered. You could switch to `TreeSet` for example.

However, the order of elements is never preserved in the database. To get ordered results when querying the database, use `@OrderBy` on the field definition. The elements will be ordered at query time.

But I would not recommend doing this. It's easier just sorting the elements in the order that you need them.