mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Failure when selecting a NEW DTO with only DTO arguments #7483
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @va5ja on GitHub (Mar 5, 2025).
Bug Report
Summary
A simple query builder or DQL statement like the following:
fails with error:
If we change the first argument to let's say a string, so:
then the query works.
Current behavior
Having a select with a single NEW DTO with only DTO arguments fails.
Expected behavior
The query works fine.
How to reproduce
It has something to do with
ObjectHydrator::hydrateRowData()and more specificallyAbstractHydrator::gatherRowData()at the following part:The last
$newObject['class']doesn't exist.It could be that this is fixed in https://github.com/doctrine/orm/pull/11825