问题
Given the following three documents in RavenDB
public class Auction {
public string Id;
public DateTimeOffset? StartingOn;
public DateTimeOffset? EndingOn;
}
public class Car {
public string Id;
public string Model;
public string Make;
public IEnumerable<string> EnlistedAuctions;
}
public class User {
public string Id;
public string Name;
public IEnumerable<string> AvailableAuctions;
}
usecase: I want to retreive all Cars for a given User. i.e. join Car to User on their matching auctions.
curveball: the user can generally have a few hundred auctions easily, so I don't want to pull that list in memory and query the car in auction ids for a list of say 300 values.
I know that joins can be achieved with the TransformResults Index, but can't get my head around it with how the Map and the TransformResults connect together (i.e. if TransformResults is the answer).
来源:https://stackoverflow.com/questions/7948364/ravendb-join-query