This issue is a (choose one):
Checklist before submitting:
Description
I propose we compare the resource_klass.name first and then the ids. This would result in grouping of identities by type before ids. Since any sorting of these does not affect compliance with the spec I consider this a minor issue for polymorphic arrays of related identities.