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

Possible regression in filtering #6831

Closed
papafe opened this issue Jul 27, 2023 · 0 comments · Fixed by #6866
Closed

Possible regression in filtering #6831

papafe opened this issue Jul 27, 2023 · 0 comments · Fixed by #6866
Assignees

Comments

@papafe
Copy link
Contributor

papafe commented Jul 27, 2023

The query in the following snippet started throwing an exception between core 13.15.0 (doesn't throw) and 13.17.0

var realm = await Realm.GetInstanceAsync();

var invent = realm.All<Inventory>()
    .Filter("Plants.@keys == 'Petunia'"); // <-------- This throws

//.....

public partial class Inventory : IRealmObject
{
    [PrimaryKey]
    [MapTo("_id")]
    public string Id { get; set; } = null!;

    public IDictionary<string, Plant?> Plants { get; } = null!;

    public IDictionary<string, bool> BooleansDictionary { get; } = null!;

    public IDictionary<string, int?> NullableIntDictionary { get; } = null!;

    public IDictionary<string, string> RequiredStringsDictionary { get; } = null!;
}

public partial class Plant : IRealmObject
{
    [PrimaryKey]
    [MapTo("_id")]
    public ObjectId Id { get; set; } = ObjectId.GenerateNewId();

    public string? Name { get; set; }

    public string? Sunlight { get; set; }

    public string? Color { get; set; }

    public string? Type { get; set; }

    public string? Partition { get; set; }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants