-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Expression parameter should be case sensitive #406
Comments
Hello @joshidp , By default, I believe case insensitive should be the default behavior as it's now. Keep in mind a lot of people are building their dynamic string through some external source so the casing might not always be good. However, we should have an option as well to force at least parameters to be case sensitive to support your scenario. We will look at it. Best Regards, Jon Performance Libraries Runtime Evaluation |
Thanks for the reply. JSON is case sensitive and LINQ is case sensitive so I feel default option for parameters in this lib also should be case sensitive, it protect us from getting incorrect results which can go unchecked as shown in my example. Anyways as long as we have an option to set the casing requirement it should be ok. Eagerly waiting for your PR/release to provide case sensitivity option. Thanks |
Hello @joshidp , The v1.2.2 has been released. We added the option Due to the high popularity of this library and how important this behavior could impact existing code, making it Let me know if everything now works as expected with this option. Best Regards, Jon |
It's working as expected, thanks for the fix 👍 |
Awesome @joshidp don't hesitate to contact us for any questions, issues or feedback! Best regards, Jon |
Hi,
Thanks for the great work!
I'm seeing one issue where I'm calling DynamicInvoke method with multiple parameters and one parameter is bool and another is a list of someclass now if the class has a prop which has same name as the bool parameter then DynamicInvoke is considering bool parameter instead of the prop inside the class list parameter. The only diff between them is of case. Please see the example below.
As you can see in the above example there is one isTrue variable and one property in DataClass which is called IsTrue, please note the case difference of "i". The query DyanmicInvoke should be independent of the variable x named as isTrue in the parameter set because it's no where used in the query, but that's not the case if I set isTrue=true result has records and when I change isTure to false then there are no records in the result and there is no change in result if I modify the value of IsTrue property of abc list var. It means DynamicInvoke is not checking the casing of the fields.
Expected result:
parameter match should be case-sensitive.
if no parameter matches with case sensitivity then error should be thrown.
It's counter intuitive when we come from c# world and use LINQ like expressions.
Please share your thoughts why it's not working as expected.
Thanks
The text was updated successfully, but these errors were encountered: