mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
getArrayBindingType method from the BasicEntityPersister is missing binary #7374
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 @delolmo on GitHub (May 28, 2024).
Bug Report
Summary
The
getArrayBindingTypemethod from theBasicEntityPersisteris missing the binary type.My guess is this:
should be changed to this:
Need expert hands though to evaluate the problem.
Current behavior
Right now, when using binary fields, the following exception can be thrown under certain circumstances (I suspect it happens when retrieving entities with associations):
How to reproduce
Not sure how to tbh.
Expected behavior
Should not throw an error.
@greg0ire commented on GitHub (May 28, 2024):
When opening the file with my IDE, I get this warning:
Match expression does not handle remaining values: Doctrine\DBAL\ParameterType::BINARY|Doctrine\DBAL\ParameterType::BOOLEAN|Doctrine\DBAL\ParameterType::LARGE_OBJECT|Doctrine\DBAL\ParameterType::NULL. You might be on to something. Would be great to have a reproducer though. A stack trace might help as well.@sips-dan-s commented on GitHub (Jan 15, 2025):
This affects us as well. We are using Ramsey/Uuid-Doctrine's
UuidBinaryTypetype for primary (and foreign) keys in some tables, and when there's a Doctrine 'eager fetch' in place, the auto-generated internal query to fetch the 'child' records (along the lines ofSELECT child_record FROM child_table WHERE id IN (...)) is hitting this issue.It's not even something we can really work around without completely re-writing the query, as it is internal to Doctrine.
Stack trace (slightly trimmed but leaving all the Doctrine internal calls intact):
@sips-dan-s commented on GitHub (May 7, 2025):
Hi, any update on this at all?
@greg0ire commented on GitHub (May 7, 2025):
A great next step would be to provide a reproducer, preferably in the form of a functional test