Open mxmissile opened 9 years ago
mobiledb isnt able to detect this Kind of relationship at the Moment. but nevertheless you are able to model this relationship yourself.
Think about the following data Schema:
public class Team {
[Identity]
public Guid Id { get; set; }
public string Name { get; set; }
}
public class Athlete {
[Identity]
public Guid Id { get; set; }
public Guid TeamId { get; set; }
public string GivenName { get; set; }
public string SurName { get; set; }
}
With this model you're able to query all the examples above.
And then use LINQ for joining. Total brain fart yesterday. Need to get out of the navigational properties mode that NHibernate gives you. Thanks @flumbee
Not really an "Issue" but more of a question.
Given Teams and Athletes, Athletes being members of Teams. How would you model this using mobiledb?
Say the Team entity has an Athletes property (Team.Athletes). And I wanted to see a list of all athletes regardless of the team. How would generate that query?
Same goes for reverse, say I have a list of Athletes, but needed to display the parent Team's name in the list. How do you query this without looping through all the athletes and querying the team for each athlete?