This is my problem.
I have a many-to-one relationship from a accountlist to a client
When i want to list accounts with client name, my HQL query (“From accountlist”)
generates thousands SQL queries, one for the accountlist and one for each client.
Is it possible, with HQL to force to make juste one sql request with a join ?
Thank’s you by advance 🙂
Yes. If you are writing a query in HQL:
or similar. NHibernate’s fetch strategies define how this sort of data is retrieved. If you specify to fetch with a JOIN, that’s what it does.