You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It is not possible to execute SQL with property indexer in SELECT clausule like this one: SELECT c["id"] FROM root c.
This is especially problem with EntityFramework Provider for Azure Cosmos DB, which generates SQL queries with property indexers.
Additional context
It is possible to use property indexers in WHERE clausule - query like SELECT c.id FROM root c WHERE c["isActive"] = true will execute.
The text was updated successfully, but these errors were encountered:
tichaczech
changed the title
SQL queries with property indexer(s) in SELECT clause failes to execute
SQL queries with property indexer(s) in SELECT clausule failes to execute
Feb 27, 2025
@lionelc Honestly, and with all due respect - it makes no sense. I would understand if you would tell me "not supported for now" or "on our roadmap" but saying "rewrite your query" really makes no sense ¯\_(ツ)_/¯. At first, we are using ADO.NET EF for Cosmos DB (a .NET ORM framework initially created by Microsoft), which generates queries by itself — I have no control over it. But even if we write the query ourselves, it should work - simply because it works on Cosmos DB.
@lionelc Honestly, and with all due respect - it makes no sense. I would understand if you would tell me "not supported for now" or "on our roadmap" but saying "rewrite your query" really makes no sense ¯\_(ツ)_/¯. At first, we are using ADO.NET EF for Cosmos DB (a .NET ORM framework initially created by Microsoft), which generates queries by itself — I have no control over it. But even if we write the query ourselves, it should work - simply because it works on Cosmos DB.
@tichaczech I was not aware you were using generated queries. We will put this item on our backlog. Thank you for your feedback. cc: @DmitriMelnikov
Describe the bug
It is not possible to execute SQL with property indexer in SELECT clausule like this one:
SELECT c["id"] FROM root c
.This is especially problem with EntityFramework Provider for Azure Cosmos DB, which generates SQL queries with property indexers.
To Reproduce
Steps to reproduce the behavior:
SELECT c["id"] FROM root c
and executeExpected behavior
SELECT c.id FROM root c
, which does not use property indexersScreenshots

Emulator - Query with indexers
Emulator - Query without indexers

Real Cosmos DB - Query with indexers

Real Cosmos DB - Query without indexers

Desktop (please complete the following information):
Additional context
It is possible to use property indexers in WHERE clausule - query like
SELECT c.id FROM root c WHERE c["isActive"] = true
will execute.The text was updated successfully, but these errors were encountered: