Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiteCollection.Find Contains works with Array but not for IEnumerable #652

Open
RytisLT opened this issue Jul 18, 2017 · 2 comments
Open
Labels

Comments

@RytisLT
Copy link

RytisLT commented Jul 18, 2017

public class ItemWithEnumerable
{
    public int[] Array { get; set; }
    public IEnumerable<int> Enumerable { get; set; }
}

This works:

LiteDatabase.Find(i => i.Array.Contains(1));

This does not:

LiteDatabase.Find(i => i.Enumerable.Contains(1));
RytisLT pushed a commit to RytisLT/LiteDB that referenced this issue Jul 18, 2017
RytisLT pushed a commit to RytisLT/LiteDB that referenced this issue Jul 18, 2017
@PascalSenn
Copy link

PascalSenn commented Mar 26, 2018

Do report a similar behavior for List.

Does not work with Query.Contains.

@JensSchadron
Copy link
Collaborator

LINQ gets translated to the Query.Contains, but I noticed as well that it doesn't work with IEnumerables. Marked it as bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants