Handle Json ExtensionData in sql translation visitor
See original GitHub issueDescribe the bug Given an object like this:
class MyEntity
{
public string MyTypedProperty { get; set; }
[JsonExtensionData]
public Dictionary<string, System.Text.Json.JsonElement>? ExtensionData { get; set; }
}
Querying against an entity with extensiondata is not possible within a LINQ expression
{l => (Convert(l.ExtensionData.get_Item("MyTest"), Object) == Convert(100, Object))}
Should convert to:
WHERE root["MyTest"] == 100
Instead converts to
WHERE root["ExtensionData"]["MyTest"] == 100
The underlying entity in Cosmos will serialize like this;
{
"MyTest": 100
}
So it is impossible to query for the “MyTest” field without dropping down to writing raw QueryDefinitions, in which case you do not have the benefit of strongly-typed expressions for the rest of your query
Issue Analytics
- State:
- Created 6 months ago
- Comments:16 (16 by maintainers)
Top Results From Across the Web
Work with JSON data in SQL Server
Parse JSON text and read or modify values. Transform arrays of JSON objects into table format. Run any Transact-SQL query on the converted ......
Read more >How to parse JSON in SQL Server
This article will show how we can parse and query the JSON in SQL Server with the help of the OPENJSON() function.
Read more >Untitled
Net STandard 2.0 - Unity Forum Custom Dictionary JsonConverter using System.Text.Json - Josef Otto… Handle Json ExtensionData in sql translation visitor ...
Read more >Using an SQL interface to handle JSON data in Db2 for z/OS
This tutorial focuses on an SQL interface that was introduced in Db2 11 for z/OS that enables you to extract and retrieve JSON...
Read more >Working with JSON data in GoogleSQL | BigQuery
You can create JSON values in the following ways: Use SQL to create a JSON literal. Use the PARSE_JSON function to convert a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @onionhammer, I am taking a look at this item. I have looked and approved 2 of your other prs.
Hello @onionhammer my apologies that the ball was dropped on your other PRs. I will ping the people who were reviewing those PRs, and we will try to get them merged. We can take this particular issue forward once the other PRs have been resolved. Please note that the other PRs will likely not be merged before next week. Thanks.