[CSHARP-1379] Support comparison operators with constant on left hand side Created: 13/Aug/15 Updated: 07/Apr/23 Resolved: 22/Mar/16 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Linq |
| Affects Version/s: | 2.0.1 |
| Fix Version/s: | 2.2.3 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Sheila Kinsella | Assignee: | Craig Wilson |
| Resolution: | Done | Votes: | 0 |
| Labels: | linq, regression | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Description |
|
Comparison queries in LINQ where the constant is on the left hand side throw an ArgumentException. For example: collection.Find(user => DateTime.Now > user.UpdatedDate); Looks like a regression of |
| Comments |
| Comment by Craig Wilson [ 22/Mar/16 ] | ||||||||||||||||||||||||||||||
|
Thanks Sheila, I've marked this as resolved in 2.2.3 and closed the ticket. | ||||||||||||||||||||||||||||||
| Comment by Sheila Kinsella [ 22/Mar/16 ] | ||||||||||||||||||||||||||||||
|
Hi Craig The below code produces an error on 2.0.1 but runs successfully on 2.2.3, I guess the issue has been resolved since.
| ||||||||||||||||||||||||||||||
| Comment by Craig Wilson [ 11/Mar/16 ] | ||||||||||||||||||||||||||||||
|
Hi Sheila, I cannot reproduce this. I used the following code:
Perhaps you could provide a console application that demonstrates the problem. Craig | ||||||||||||||||||||||||||||||
| Comment by Sheila Kinsella [ 14/Aug/15 ] | ||||||||||||||||||||||||||||||
|
I tested this with a property of type int and it worked fine so maybe this is only an issue with DateTime |