fixed server to-one relationship JSON representation bug

need to sort arrays of to-many relationships