sorting comparedTo arrays for already exising metadata graphs