Skip to content

Query: LINQ: WHERE predicate for Dictionary doesn't work #5547

@michal-laskowski

Description

@michal-laskowski

I have class with

public Dictionary<string, object> AdditionalData{ get; set; }

I want to query all documents with predicate

Where(x => x.AdditionalData.Any(x => x.Value.ToString() == searchFor))

Actual behavior
This is translated to

SELECT VALUE EXISTS(SELECT VALUE x0 FROM root JOIN x0 IN root["AdditionalData"] WHERE (ToString(x0["Value"]) = "search_for_input"))

Expected behavior
I would expect that SDK will use OBJECTTOARRAY and process properly query.

Environment summary
SDK Version: 3.56.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions