mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Break in 2.8: Cannot bind QueryBuilder parameters with \IteratorAggregate entities: leads to incorrect SQL generated code #6577
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 @ambroisemaupate on GitHub (Dec 4, 2020).
Bug Report
Binding QueryBuilder query parameters to entities that implements \IteratorAggregate leads to incorrect DQL generated code.
418587bIt seems that QueryBuilder tries to serialize object instead of using its primary key:
leads into:
To fix this I need to explicitely use primary key
$node->getId():https://github.com/doctrine/orm/issues/8181
@ambroisemaupate commented on GitHub (Dec 4, 2020):
Possibly due to
https://github.com/doctrine/orm/blob/2.8.x/lib/Doctrine/ORM/AbstractQuery.php#L423
@ambroisemaupate commented on GitHub (Dec 4, 2020):
Here is a test case to reproduce this issue:
eca3a3fb15@beberlei commented on GitHub (Dec 4, 2020):
Fixed by #8371