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
I'm writing an application where I have many related entities and I use Guid most of the time as key type.
However, this causes a lot of issues with queries like the following:
The generated query is explicitly performing an array mapping with the to-string function:
SELECT`Extent1`as`user`,
(SELECT RAW `Extent2`FROM`team`as`Extent2` USE KEYS ARRAY TOSTRING(`Extent3`) FOR `Extent3`IN`Extent1`.`teams` END) as`teams`,
(SELECT RAW `Extent4`FROM`group`as`Extent4` USE KEYS ARRAY TOSTRING(`Extent5`) FOR `Extent5`IN`Extent1`.`groups` END) as`groups`FROM`user`as`Extent1` USE KEYS ['00000000-0000-0000-0001-000000000001']
LIMIT1
Instead, the query I would expect to get should look like this:
SELECT`Extent1`as`user`,
(SELECT RAW `Extent2`FROM`team`as`Extent2` USE KEYS `Extent1`.`teams`) as`teams`,
(SELECT RAW `Extent4`FROM`group`as`Extent4` USE KEYS `Extent1`.`groups`) as`groups`FROM`user`as`Extent1` USE KEYS ['00000000-0000-0000-0001-000000000001']
LIMIT1
Instead I would like to be able to either directly write
teamCtx.Query<Team>().UseKeys(u.Teams).ToList()
or at least be able to use the Linq cast function like this to make it compile properly and generate an efficient query:
I'm writing an application where I have many related entities and I use Guid most of the time as key type.
However, this causes a lot of issues with queries like the following:
The generated query is explicitly performing an array mapping with the to-string function:
Instead, the query I would expect to get should look like this:
Instead I would like to be able to either directly write
or at least be able to use the Linq cast function like this to make it compile properly and generate an efficient query:
However this last variant is throwing an error:
No coercion operator is defined between types 'System.Guid' and 'System.String'.
Is there any other way to achieve the query I intended or would this require an adjustment to this library?
The text was updated successfully, but these errors were encountered: