[CSHARP-4702] LINQ3 using list.Any(s => m.Field.Contains(s)) fails when Field is null/missing Created: 30/Jun/23 Updated: 28/Oct/23 Resolved: 04/Jul/23 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.21.0 |
| Type: | Bug | Priority: | Unknown |
| Reporter: | John Gonyo | Assignee: | Robert Stam |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Documentation Changes: | Not Needed |
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
| Description |
| Comments |
| Comment by Githook User [ 04/Jul/23 ] |
|
Author: {'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}Message: |
| Comment by Robert Stam [ 03/Jul/23 ] |
|
Thanks for reporting this. The reason it was failing was that the code `model.Foo.Contains(value)` was calling `List<string>.Contains` instead of `Enumerable.Contains` so we weren't recognizing it as being equivalent to `Enumerable.Contains`. I have a fix in code review. |
| Comment by PM Bot [ 30/Jun/23 ] |
|
Hi jgonyo@snagajob.com, thank you for reporting this issue! The team will look into it and get back to you soon. |