You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Tupitsyn (Jira)" <ji...@apache.org> on 2023/04/07 15:00:00 UTC
[jira] [Updated] (IGNITE-18120) .NET: Thin 3.0: Allow arbitrary MemberInit projections in LINQ
[ https://issues.apache.org/jira/browse/IGNITE-18120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Tupitsyn updated IGNITE-18120:
------------------------------------
Ignite Flags: (was: Docs Required,Release Notes Required)
> .NET: Thin 3.0: Allow arbitrary MemberInit projections in LINQ
> --------------------------------------------------------------
>
> Key: IGNITE-18120
> URL: https://issues.apache.org/jira/browse/IGNITE-18120
> Project: Ignite
> Issue Type: Improvement
> Components: platforms
> Reporter: Pavel Tupitsyn
> Assignee: Sergey Stronchinskiy
> Priority: Major
> Labels: .NET, LINQ, ignite-3
> Fix For: 3.0.0-beta2
>
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> Ignite LINQ provider allows anonymous type projections:
> {code}
> query.Select(emp => new {Id = emp.Key, Name = emp.Value.Name});
> {code}
> However, it does not work with a custom class:
> {code}
> query.Select(emp => new Foo {Id = emp.Key, Name = emp.Value.Name});
> {code}
> throws exception:
> {code}
> System.NotSupportedException : The expression 'new Foo() {Id = [x].Key}' (type: System.Linq.Expressions.MemberInitExpression) is not supported.
> {code}
> Add VisitMemberInit overload to CacheQueryExpressionVisitor to support this scenario. See linked SO page for more details - there is a proposed fix as well.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)