code: public function sortIds($idList, $strDirection)
      {
          // Base implementation, do a simple sorting on given column.
          $idList = $this->connection->createQueryBuilder()
              ->select('id')
              ->from($this->getMetaModel()->getTableName())
              ->where('id IN (:ids)')
              ->setParameter('ids', $idList, Connection::PARAM_STR_ARRAY)
              ->orderBy($this->getColName(), $strDirection)
              ->execute()
              ->fetchAll(\PDO::FETCH_COLUMN, 'id');
  
          return $idList;
      }
docs: {@inheritdoc}
  
  This base implementation does a plain SQL sort by native value as defined by MySQL.