Updating relationship sorting.(DHH-554)