[CSHARP-3075] Collection Aggregation Merge Default Value Throws an Exception Created: 26/Apr/20 Updated: 28/Oct/23 Resolved: 14/Oct/20 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | BSON |
| Affects Version/s: | 2.10.2 |
| Fix Version/s: | 2.12.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Christopher Lombardi | Assignee: | Mikalai Mazurenka (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 10, Microsoft .Net Framework 4.7.2 |
||
| Description |
|
This line tries to convert what could be a BsonString type parameter into a BsonDocument and fails. The default (by documentation) acceptable input for a $merge aggregation pipeline operation is the collection name only (a string), but could be a complex object with properties like: into. Workaround: I could put the, "into" property and make a BsonDocument as a $merge operation's value, but I only knew to do this by reading the source code after receiving an error that the BsonString could not be converted to a BsonDocument. |
| Comments |
| Comment by Githook User [ 14/Oct/20 ] | |||||||||||||||||||||
|
Author: {'name': 'Mikalai Mazurenka', 'email': 'mikalai.mazurenka@mongodb.com', 'username': 'MikalaiMazurenka'}Message: | |||||||||||||||||||||
| Comment by Robert Stam [ 21/Sep/20 ] | |||||||||||||||||||||
|
Thank you for reporting this. I am able to reproduce this. Reproduction:
| |||||||||||||||||||||
| Comment by Christopher Lombardi [ 26/Apr/20 ] | |||||||||||||||||||||
|
Problem: |