protected function initEntities($constraints = '', $joins = '', $sorting = '')
    {
        $this->items = [];

        $query = implode(' ', [
            'SELECT t0.* FROM', '`' . $this->table . '` AS t0'
        ]);

        $statement = $this->adapter->getDriver()->query($query . $joins . $constraints . $sorting);
        $class = $this->adapter->getSchema($this->table, 'class');

        do {
            $row = $statement->fetchAssoc();

            if (is_array($row)) {
                /** @var \Rio\AbstractEntity $entity */
                $entity = new $class($this->adapter);
                $entity->fromArray($row);

                $this->items[$row[$this->adapter->getSchema($this->table, 'primary')]] = $entity;
            }
        } while (false !== $row);
    }