c# - NHibernate fetching nested collections -


i'm rookie in nhibernate.

i have problem nested collections. objects structure :

product-> collection->item->collecion -> item

i need fetch data, stuck on fetching second collection.

        var partbase = session.query<product>()             .fetch(x => x.baseuom)             .fetch(x => x.category)             .fetch(x => x.x)             .fetch(x => x.y)             .fetch(x => x.z).where(x => x.id == partbaseid.id);              partbase.fetchmany(x => x.parts)              .thenfetch(x =>x.item)              .thenfetchmany(x=> x.variables)              .tofuture();          return partbase.tofuture().tolist().firstordefault(); 

i getting exception "cannot simultaneously fetch multiple bags" after "thenfetchmany".

any suggesions ?

thanks


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -