-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the support for custom parameter types in native queries #11543
Conversation
e6efb86
to
3d63dfd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@derrabus no reason I think. Removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.