-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[release/3.1] Check if parameter.Name is not null before comparing it with query pa… #20521
Conversation
379142e
to
5a1c2bd
Compare
DescriptionEF does special processing for certain parameters which are created by query during parameter extraction (for caching). To do this we compare the prefix of parameter name. This threw NRE when a parameter which had no name encountered. Customer ImpactError for dynamically generated queries by multiple different libraries as parameter name is not required during expression tree generation. How foundReported by multiple customers. Test coverageAdded a manually build expression with null parameter.Name which fails without this fix in the manner reported by customers. Regression?Yes. RiskLow. Fix only affects make comparison null safe without affecting existing functionality. |
@smitpatel Can you add a regression test that creates a couple of expression trees without parameter names? Also, I think this likely is a regression in the sense that I think that we handled this case in the previous pipeline, or am I wrong about that? |
5a1c2bd
to
c3f7417
Compare
Updated. Added regression test and quirk. |
@smitpatel Approved by tactics for 3.1.4. Please merge ASAP. |
…rameter Resolves #20485 Parameters which are used inside lambda should get replaced with appropriate shaper/selector. All other parameters should be query parameters otherwise it is an error.
c3f7417
to
2a58824
Compare
…rameter
Resolves #20485
Parameters which are used inside lambda should get replaced with appropriate shaper/selector.
All other parameters should be query parameters otherwise it is an error.