-
Notifications
You must be signed in to change notification settings - Fork 934
v5.3.2 Invalid cast on nullable custom type with Linq Equals Method #2483
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
Comments
I don't quite understand why using For where userSession.OpenDate.Value == DateTime.Now the query will be executed without adding the |
Before 5.3 if we use == operator NH adding unnecessary IS NULL condition, then @maca88 fixes that issue at 5.3. As I understand we need to change Equals method with == operator. |
Closing as not an issue, because one part is now somehow reported and closed by #2488, and the other part has to be fixed by adjustments in user code. |
Hi,
We are trying to upgrade NH 5.3.2.
We come across an issue, I implemented below test cases, we are using Equals method instead of == operator as a workaround to remove unnecessary IS NULL conditions from queries.
https://github.com/gokhanabatay/NHibernateBugTest/blob/master/NHibernateBugTest/CustomTypeSelectFailsTest.cs
Get_DateCustomType_NullableDateValueEqualsV2_IncorrectCast
Get_DateCustomType_NullableDateLetUsage_FailsWithEqualsOperator
The text was updated successfully, but these errors were encountered: