[CSHARP-1519] Using GetType in Group throws instead of translating to _t Created: 28/Dec/15 Updated: 03/Dec/20 Resolved: 03/Dec/20 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Linq |
| Affects Version/s: | 2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Bar Arnon | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
There's no to use Group (and probably other aggregations) with anonymous types to generate a projection for the discriminator (i.e. _t). For example this works:
But grouping on the document type:
throws an exception with the following message:
|
| Comments |
| Comment by Jeffrey Yemin [ 03/Dec/20 ] |
|
Closing as Won't Fix, but can re-open if there is still interest. |
| Comment by Craig Wilson [ 05/Jan/16 ] |
|
Hi Bar, Thanks for the report. I spent a little time looking at this today and it will be surprisingly difficult to make this work right. I'm going to move this into the Planned but not Scheduled bucket and come back to it. Craig |