[CSHARP-1601] Query MongoDb sublists with C# LINQ regex Created: 11/Mar/16 Updated: 02/Feb/22 Resolved: 02/Feb/22 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Linq |
| Affects Version/s: | 2.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Søren Holstebroe | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | CSHARP-3615 |
| Description |
|
As posted here: Regex IsMatch does not seem to work on list-properties although the same LINQ query runs fine on a standard list. I.e. given public class Car { public string Name; public List<string> Colors; }this only works for plain list LINQ: var regex = new Regex("^Blue.*"); The above just silently returns an empty queryable. |
| Comments |
| Comment by James Kovacs [ 02/Feb/22 ] | |||||||||||||||||||||||||||||||||||||||
|
Re-tested with .NET/C# driver v2.14.1 with both LINQ2 and LINQ3 implementations. Both produce correct results.
LINQ3 output:
Please re-open with additional details if the query is not behaving as you expect. |