sorts correctly for ObjectId fields