tags:

views:

58

answers:

1

i have this method:

    public IEnumerable<Album> GetAllAlbumsWithTracks()
    {
        var albums = 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?

A: 

try setting the fetch mode to join

jcomet
CurlyFro