[CSHARP-2557] Change in behaviour of parsing nested .Any predicates Created: 21/Mar/19 Updated: 28/Oct/23 Resolved: 08/Apr/19 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Linq |
| Affects Version/s: | 2.8.0 |
| Fix Version/s: | 2.8.1 |
| Type: | Bug | Priority: | Blocker - P1 |
| Reporter: | Kevin Fairs | Assignee: | Dmitry Lukyanov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Major Change | ||||||||
| Description |
|
Hello I have 2 classes: public class Donation { public ObjectId Id \{ get; set; }public ICollection<Item> Items { get; set; } } public class Item { public ObjectId Id { get; set; } public ICollection<ObjectId> ParentIds { get; set; } } Example Data: { "_id" : ObjectId("553682b4ecab640ee4ba35e5"), "Items" : [ { "_id" : ObjectId("553682b4ecab640ee4ba35e6"), "ParentIds" : [ ObjectId("55368285ecab640eb8d6976f"), ObjectId("55368256ecab640eb8d6976e"), ObjectId("55016c84b9e76f04a8821be5") ] } ]}
I have the following c# predicate:
V2.7.3 behaviour emits: .find({ "Items.ParentIds" : ObjectId("55368256ecab640eb8d6976e") })
V.2.8.0 behaviour emits: .find({ "Items.ParentIds" : { "$elemMatch" : { "" : ObjectId("55368256ecab640eb8d6976e") }} })
This breaks our production build, working happily for several years now....
Thanks
|
| Comments |
| Comment by Githook User [ 06/Apr/19 ] |
|
Author: {'email': 'dmitry_lukyanov@epam.com', 'name': 'Dmitry Lukyanov', 'username': 'dmitry-lukyanov'}Message: |
| Comment by Githook User [ 05/Apr/19 ] |
|
Author: {'name': 'Dmitry Lukyanov', 'username': 'dmitry-lukyanov', 'email': 'dmitry_lukyanov@epam.com'}Message: |