[CSHARP-1326] Grouping mongodb filtered results by reference id throws Created: 18/Jun/15  Updated: 03/Nov/22  Resolved: 03/Nov/22

Status: Closed
Project: C# Driver
Component/s: API, Linq, Operations
Affects Version/s: 2.0.1
Fix Version/s: 2.19.0

Type: Improvement Priority: Minor - P4
Reporter: Cvetomir Todorov Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Both .NET 4.5 and Mono 4.0


Issue Links:
Depends
depends on CSHARP-4391 BsonClassMap should support deseriali... Closed
is depended on by CSHARP-4331 Make LINQ3 the default LinqProvider Closed
Backwards Compatibility: Fully Compatible

 Description   

http://stackoverflow.com/questions/30569999/grouping-mongodb-filtered-results-by-reference-id-throws



 Comments   
Comment by Githook User [ 03/Nov/22 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-1326: Fix edge case in Implements and TryGetIEnumerableGenericInterface.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/daf21242cd9b49825f1ec28864b110e292997f47

Comment by Robert Stam [ 03/Nov/22 ]

This issue has been fixed in the new LINQ provider (known as LINQ3), which was introduced in the 2.14 release.

Configure your MongoClientSettings to use LinqProvider.V3 if you want to use this functionality.

To configure a client to use the LINQ3 provider use code like the following

var connectionString = "mongodb://localhost";
var clientSettings = MongoClientSettings.FromConnectionString(connectionString);
clientSettings.LinqProvider = LinqProvider.V3;
var client = new MongoClient(clientSettings);

Comment by Githook User [ 03/Nov/22 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-1326: Fix issue when using IGrouping as IEnumerable.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/f5c2cbf94d596ce07aacf76f5955720c65923b01

Generated at Wed Feb 07 21:39:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.