[CSHARP-1431] Predicated Any doesn't render correct field names. Created: 01/Oct/15  Updated: 20/Jan/16  Resolved: 03/Oct/15

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 2.1
Fix Version/s: 2.1

Type: Bug Priority: Major - P3
Reporter: Craig Wilson Assignee: Craig Wilson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

var local = new [] { "Betty", "Admins" };
users.AsQueryable().Where(x => x.Permissions.Any(p => local.Contains(p.User)));

renders:

[{ "$match" : { "User" : { "$in" : ["Betty", "Admins"] } } }]

but it should render:

{ "$match" : { "Permissions.User" : { "$in" : ["Betty", "Admins"] } } }

Notice that the Permissions prefix is left out.



 Comments   
Comment by Githook User [ 02/Oct/15 ]

Author:

{u'username': u'craiggwilson', u'name': u'Craig Wilson', u'email': u'craiggwilson@gmail.com'}

Message: CSHARP-1431: fixed issue with a local Contains operation inside an Any predicate.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/f55eecc03bdf7f1e0e2e1dc1784fca054bb093e7

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