You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is, when using Raw DQL (or building the query) Doctrine does not have the context, and does not know what is an Ulid. When you call setParameter without providing the $type argument, Doctrine try to guess the type, and, sadly, the logic is very simplistic (see https://github.com/doctrine/orm/blob/2.7/lib/Doctrine/ORM/Query/ParameterTypeInferer.php).
by default, Doctrine think an ulid is a string and then, cast the value to string (while the value is stored as binary).
When using the Repository, you don't have such issue, because doctrine know the class and know the type of the field
Uh oh!
There was an error while loading. Please reload this page.
The issue is, when using Raw DQL (or building the query) Doctrine does not have the context, and does not know what is an Ulid. When you call
setParameter
without providing the$type
argument, Doctrine try to guess the type, and, sadly, the logic is very simplistic (see https://github.com/doctrine/orm/blob/2.7/lib/Doctrine/ORM/Query/ParameterTypeInferer.php).by default, Doctrine think an
ulid
is astring
and then, cast the value to string (while the value is stored as binary).When using the Repository, you don't have such issue, because doctrine know the class and know the type of the field
Several solution for you.
see symfony/symfony#39135 (comment) for full reference. Ping @warslett
The text was updated successfully, but these errors were encountered: