[CSHARP-65] LINQ Query returns non empty result collection when it shouldn't Created: 14/Sep/10 Updated: 19/Oct/16 Resolved: 29/Oct/10 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | SAMUS |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Oliver Weichhold | Assignee: | Sam Corder |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Given the following entity and an empty collection in the database: public class Post public DateTime LastAccess { get; set; } public List<string> Tags { get; set; }} The following query should return an empty list but it returns a list containing a single empty Post entity: List<string> SearchTags = new List<string> {"test"}; var result = SearchTags.Aggregate(posts.Linq(), (current, tag) => current.Where(x => x.Tags.Any(t => t == tag))).OrderByDescending( |
| Comments |
| Comment by Steve Wagner [ 29/Oct/10 ] |
|
Migrated to http://github.com/mongodb-csharp/mongodb-csharp/issues/issue/19 |