[CSHARP-1836] Legacy v2.x FindAndModify operation returns modified document by default (instead of original) Created: 23/Nov/16 Updated: 19/Dec/16 Resolved: 07/Dec/16 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Operations |
| Affects Version/s: | 2.0 |
| Fix Version/s: | 2.4.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Maksim Krautsou [X] | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
According to documentation, FindAndModify method should return original document by default. But, it seems like, without specifying VersionReturned it returns modified document. It case of using the following overloading of method:
It doesn't specify which version of document should be returned. According to this fragment:
It will be the same as:
Need to add checking for null value and handle null as a default (original\before document) value. |
| Comments |
| Comment by Githook User [ 07/Dec/16 ] |
|
Author: {u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}Message: |
| Comment by Githook User [ 07/Dec/16 ] |
|
Author: {u'username': u'MaKCbIMKo', u'name': u'Maksim Krautsou', u'email': u'Maksim_Krautsou@epam.com'}Message: |
| Comment by Robert Stam [ 06/Dec/16 ] |
|
This bug only exists in the Legacy API of the v2.x versions of the driver. The v1.x versions and the new CRUD API in the v2.x versions correctly default to return the original document. |
| Comment by Robert Stam [ 30/Nov/16 ] |
|
This is indeed a bug. Will have to think about whether fixing it is a backward breaking change. |