Fix the support for custom parameter types in native queries#11543
Conversation
e6efb86 to
3d63dfd
Compare
greg0ire
left a comment
There was a problem hiding this comment.
Can you please add a test for this? 🙏
3d63dfd to
00f2925
Compare
|
@greg0ire I added a test similar to the test added in #7528 (which fixed it for DQL queries), which uses a mock to ensure that one part of the value processing is never called in the test. |
00f2925 to
4b154e1
Compare
|
|
||
| class NativeQueryTest extends OrmTestCase | ||
| { | ||
| use VerifyDeprecations; |
There was a problem hiding this comment.
I created this file by copying another one, and I forgot to remove that trait
The Query class (used for DQL queries) takes care of using the value and type as is when a type was specified for a parameter instead of going through the default processing of values. The NativeQuery class was missing the equivalent check, making the custom type work only if the default processing of values does not convert the value to a different one.
4b154e1 to
9bd51aa
Compare
|
Thanks @stof ! |
The Query class (used for DQL queries) takes care of using the value and type as is when a type was specified for a parameter instead of going through the default processing of values.
The NativeQuery class was missing the equivalent check, making the custom type work only if the default processing of values does not convert the value to a different one.