-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Dotnet Drivers
-
None
-
None
-
None
-
None
-
None
-
None
This issue was found running the EF provider spec tests--see EF-224
C# driver only repro:
var client = new MongoClient("mongodb://localhost:27017"); var database = client.GetDatabase("db224"); database.DropCollection("customers"); var collection = database.GetCollection<Customer>("customers"); collection.InsertMany([ new() { Id = 1, City = "London", Country = "UK" }, new() { Id = 2, City = "London", Country = "USA" }, new() { Id = 3, City = "Seattle", Country = "UK" }, new() { Id = 4, City = "Seattle", Country = "USA" } ]); var results = collection.AsQueryable() .Where(c => c.City.IndexOf("e") != -1) .ToList(); foreach (var result in results) { Console.WriteLine($"Found {result} {result.City} {result.Country}"); } public class Customer { public int Id { get; set; } public string City { get; set; } public string Country { get; set; } }
- is depended on by
-
EF-224 String.IndexOf comparisons to -1 return incorrect results
-
- Backlog
-
- is related to
-
CSHARP-5844 Support additional IndexOf comparisons to -1 and 0
-
- Needs Triage
-
- split from
-
EF-224 String.IndexOf comparisons to -1 return incorrect results
-
- Backlog
-