public class Customer
{
public class Contact
{
public string Phone { get; set; }
public String email { get; set; }
public int id { get; set; }
}
[LiteDB.BsonId]
public Int64 dataid { get; set; }
public string Name { get; set; }
public int Age { get; set; }
public List<Contact> contacts { get; set; }
public bool IsActive { get; set; }
}
List<int> Ids5 = new List<int>() { 22, 43, 14 };
var find5 = col.Find(x => x.contacts.Select(c => Ids5.Contains(c.id)).Any(t => t == true)).ToList();
db.Rebuild();
List<int> Ids4 = new List<int>() { 22 };
var find4 = col.Find(x => x.contacts.Select(c => Ids4.Contains( c.id) ).Any( t => t == true )).ToList();
find5' is correct , have 3 elements.
find4's should be only one customer named "Person2" , but have 3 elements.
I have trace the source code .
if disable BsonExpresssion ’s BsonExpressionScalarDelegate cache and BsonExpressionEnumerableDelegate cache .
compile the expression every time .
the result will be correct
Version latest
Describe the bug document:
data:
query step:
find5' is correct , have 3 elements. find4's should be only one customer named "Person2" , but have 3 elements.
I have trace the source code . if disable BsonExpresssion ’s BsonExpressionScalarDelegate cache and BsonExpressionEnumerableDelegate cache . compile the expression every time . the result will be correct
Code to Reproduce Every time