[CSHARP-3702] Expression.Not not supported for null value in expression parameter Created: 03/Jun/21 Updated: 27/Oct/23 Resolved: 08/Jun/21 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Unknown |
| Reporter: | Антон Сухоруков | Assignee: | Boris Dogadov |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
We have expression for find recodrs:
Also we have function for negation expressions
In method Find after applying NegationExpression for Source Expression driver throw next exception:
|
| Comments |
| Comment by Антон Сухоруков [ 08/Jun/21 ] | |||||||||||||||||||||||||||||||||||||||||
|
Your advice helped, and the problem is no longer reproduced! thanks =) | |||||||||||||||||||||||||||||||||||||||||
| Comment by Boris Dogadov [ 07/Jun/21 ] | |||||||||||||||||||||||||||||||||||||||||
|
Hi antonsuhorukov94@gmail.com, In the provided example, CustomerNotNullSpecification.Expression returns new expression instance on each invocation. As NotSpecification.Expression constructs Not expression using two different Expression instances, the internal parameters biding fails. Changing NotSpecification.Expression to
resolves the problem in the attached application. Please let us know whether this fix resolves the issue in your application.
| |||||||||||||||||||||||||||||||||||||||||
| Comment by Антон Сухоруков [ 07/Jun/21 ] | |||||||||||||||||||||||||||||||||||||||||
|
Version of driver is 2.11.6 self-contained app:
| |||||||||||||||||||||||||||||||||||||||||
| Comment by James Kovacs [ 04/Jun/21 ] | |||||||||||||||||||||||||||||||||||||||||
|
Hi, antonsuhorukov94@gmail.com, We attempted to reproduce the reported issue with the following code, but it did not result in the InvalidOperationException that you encountered:
Output:
In order to investigate further, please provide:
We look forward to working with you to reproduce and resolve this issue. Sincerely, | |||||||||||||||||||||||||||||||||||||||||
| Comment by Esha Bhargava [ 04/Jun/21 ] | |||||||||||||||||||||||||||||||||||||||||
|
antonsuhorukov94@gmail.com Thank you for reporting this issue! We'll look into it and get back to you soon. |