public function getVersions($mixID, $onlyActive = false)
    {
        $queryBuilder = $this->connection->createQueryBuilder();
        $queryBuilder->select(['tstamp', 'version', 'username', 'active']);
        $queryBuilder->from('tl_version');
        $queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.formTable', ':formTable'));
        $queryBuilder->setParameter(':formTable', $this->source);
        $queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.pid', ':pid'));
        $queryBuilder->setParameter(':pid', $mixID);

        if ($onlyActive) {
            $queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.active', ':active'));
            $queryBuilder->setParameter(':active', '1');
        } else {
            $queryBuilder->orderBy('tl_version.version', 'DESC');
        }

        $statement = $queryBuilder->execute();
        if (0 === $statement->rowCount()) {
            return null;
        }

        $versions = $statement->fetch(\PDO::FETCH_ASSOC);

        $collection = $this->getEmptyCollection();

        foreach ($versions as $versionValue) {
            $model = $this->getEmptyModel();
            $model->setId($mixID);

            foreach ($versionValue as $key => $value) {
                if ($key === $this->idProperty) {
                    continue;
                }

                $model->setProperty($key, $value);
            }

            $collection->push($model);
        }

        return $collection;
    }