Skip to content

Improve return type of getArrayResult#443

Closed
VincentLanglet wants to merge 1 commit intophpstan:1.3.xfrom
VincentLanglet:improvement/array-result
Closed

Improve return type of getArrayResult#443
VincentLanglet wants to merge 1 commit intophpstan:1.3.xfrom
VincentLanglet:improvement/array-result

Conversation

@VincentLanglet
Copy link
Copy Markdown
Contributor

Works fine with

$i = $this->createQueryBuilder('d')
            ->select('d')
            ->getQuery()
            ->setMaxResults(1)
            ->getOneOrNullResult(AbstractQuery::HYDRATE_ARRAY);

But I need to also find a way to support multi-select like

$i = $this->createQueryBuilder('d')
            ->select('d', 'u')
            ->join('d.user', 'u')
            ->getQuery()
            ->setMaxResults(1)
            ->getOneOrNullResult(AbstractQuery::HYDRATE_ARRAY);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant