sort_id if exists with new method hasColumn