I am using NHibernate and started using the NHibernate profiler and realized that I have a lot of SQL queries needed. One of the main optimizations for me is the desire to join the front in order to avoid problems with the choice of N + 1.
I am trying to figure out how best to make welcome connections using NHibernate:
IList projects = session.CreateQuery(
"from Project p left join fetch p.Sponsors left join fetch p.Desks")
.List();
But this continues to appear with an error:
QueryException: Failed to resolve Property in Domain.Project Sponsors
What is the best way to make reliable connections using NHibernate?
source
share