Skip to content

Issue with toIterable() and selecting multiple entities #8413

@Cartman34

Description

@Cartman34

My code was previously working and since the last update, all the application is down due to toIterable() returning only the last entity when selecting multiple entities.

At line 179 in AbstractHydrator, Doctrine is doing yield end($result); causing the issue, the call to end() function should not be used.
$result is a simple array containing all retrieved entities, calling end() is just returning the last one.

I tested and the solution is really simple: Just remove the end() call, only yield $result;

This may be related to #8410

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions