NHibernateFetching multiply collections in one roundtrip
Please do not abuse, but this is really cool:
IList list = (IList)s.CreateMutliQuery()
.Add("select b from Blog b left join fetch b.Users where b.Id = :id")
.Add("select b from Blog b left join fetch b.Posts where b.Id = :id")
.SetInt32("id", 123)
.List()[0];
Blog b = list[0] as Blog;
More posts in "NHibernate" series:
- (19 Nov 2010) Complex relationships
- (27 Jun 2010) Streaming large result sets
- (25 May 2009) Why do we need to specify the query type twice?
- (20 Mar 2009) Avoid identity generator when possible
- (26 Mar 2007) Nullable DateTime Issues
- (08 Jan 2007) Fetching multiply collections in one roundtrip
Comments
Comment preview