Hello,
When executing the following code I only get two players for each team
and for the first team I even get two times the same player (there are
more than 2 players in each team)

                    INHibernateQueryable<Match> queryable =
session.Linq<Match>();
                    queryable.QueryOptions.RegisterCustomAction(c =>
c.SetResultTransformer(new DistinctRootEntityResultTransformer()));
                    queryable.Expand("HomeTeam");
                    queryable.Expand("HomeTeam.Players");
                    queryable.Expand("AwayTeam");
                    queryable.Expand("AwayTeam.Players");

                    this.match = queryable.Single(m => m.Id == 1);

Is there a way to eager load all players ? Maybe wih plain criteria
API ?

For the moment I'm using this workaround but that's two more queries:

                    INHibernateQueryable<Match> queryable =
session.Linq<Match>();
                    queryable.Expand("HomeTeam");
                    queryable.Expand("AwayTeam");

                    this.match = queryable.Single(m => m.Id == 1);

                    Player[] hack1 = match.HomeTeam.Players.ToArray();
                    Player[] hack2 = match.AwayTeam.Players.ToArray();

Thanks in advance

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to