-
Type: New Feature
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.6
-
Component/s: Linq
-
None
-
Environment:windows 2k8 r2, using mongodb version 2.0.6 64-bit, using driver 1.6
Lets say i have this simplified version of my task workflow:
public class TaskGraph
{
[BsonId]
public BsonObjectId Id
public List<Task> Tasks { get; set; }
}
public class Task
{
[BsonId]
public Guid Id
public string AssignedTo { get; set; }
// other stuff elided
}
In this case, the following query (where I'm trying to get all tasks assigned to me regardless of which workflow they are a part of):
var db = DBUtils.GetMongoDB("taskpoc");
var queryCtx = db.GetCollection<TaskGraph>("TaskGraphs").AsQueryable();
var tasksAssignedToMe = queryCtx
.SelectMany(tg => tg.Tasks)
.Where(t => t.AssignedTo == "tkrick");
... throws the following exception:
System.NotSupportedException
This feature is to enable this to return those results.
- is duplicated by
-
CSHARP-912 Support SelectMany where subset comes from a single document
- Closed