mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
2.19.7 breaks entity parameters when set from query-builder to native-query #7416
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 @ro0NL on GitHub (Sep 5, 2024).
BC Break Report
Summary
Given
(AbstractQuery) $qb->execute($qb->getParameters()), if one of the parameters is a proxy entity, since 2.19.7 it produces:@ro0NL commented on GitHub (Sep 5, 2024):
We have a native query (
$native = $entityManager->createNativeQuery())We then transfer original QB parameters to the native one;
I believe it's incompatible API, but im not sure about the related commit here.
@greg0ire commented on GitHub (Sep 5, 2024):
A native query you say?
Try reverting the one in my link please.
@ro0NL commented on GitHub (Sep 5, 2024):
Thanks! We're skipping
processParameterValuenow, thusgetSingleIdentifierValue@ro0NL commented on GitHub (Sep 5, 2024):
The triggering call is
$qb->setParameter('products', $products), where $products is an array of entities@greg0ire commented on GitHub (Sep 5, 2024):
It's unclear to me if you've tried reverting the commit or not.
@ro0NL commented on GitHub (Sep 5, 2024):
@greg0ire sorry!
yes, commenting out
100% solves it.
I dont think it should be part of a patch release.
@ro0NL commented on GitHub (Sep 5, 2024):
Of course, im also curious if we can maintain the current compatibility, since we rely on default infered typing.
@stof commented on GitHub (Sep 5, 2024):
What is
$p->getType()in your case ?