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

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -