-
Notifications
You must be signed in to change notification settings - Fork 254
Open
Milestone
Description
Consider the following entity:
public class User
{
[Key]
public Guid Id { get; set; }
[Column(TypeName = "jsonb")]
public Dictionary<string, object> Properties { get; set; }
}And then querying:
context.User.Where(x => x.Properties["something"] == "something else").ToList();Ends up not being able to translate.
Translating the method call of get_Item to something npgsql can understand has proven to be difficult. And one would assume translating it into the proper binding is not possible due to the dynamic nature. I would assume some internal work is needed to properly translate get_Item into sql directly instead.
I looked into perhaps doing a custom Visitor to handle this case but my Expression knowledge lacks in this case and it does not seem possible in the end anyways.
Also to clarify, changing the dictionary to a JsonDocument type is not warranted in this case.
martinzima, ptlthg, astarche, tcoreal, mrRashidkk and 20 more
Metadata
Metadata
Assignees
Labels
No labels