i have this method:
public IEnumerable<Album> GetAllAlbumsWithTracks()
{
var albu开发者_Go百科ms = Session.CreateCriteria(typeof(Album))
.SetFetchMode("Tracks", FetchMode.Eager)
.SetResultTransformer(new DistinctRootEntityResultTransformer()).Future<Album>();
return albums;
}
but if i set .SetMaxResult(10) i get back 10 Tracks not Albums. how do i fix this?
try setting the fetch mode to join
精彩评论