2

First of all I should say that I did not familiar with Nhibernate at all, but project that I work with using this ORM instead of EF, I don't know why. As I know this bug can be fixed by splitting queries, but I do not have any idea how to make this by using NHibernate.
Here is the query:

query = query.Where(c => c.Trade.Id == tradeId);
query = query
  .Fetch(lot => lot.Items)
  .Fetch(lot => lot.Documents)
  .Fetch(lot => lot.TradeLotApplications)
  .FetchMany(lot => lot.Customers)
  .ThenFetch(cus => cus.Customer);
lots = query.ToList();
andrey.shedko
  • 3,128
  • 10
  • 61
  • 121

0 Answers0