Yes. You're right. But I want a generated sql like that * "SELECT * FROM (SELECT this_.departmentName, this_.companyName FROM Department Dpt INNER JOIN Company Co on Co.departmentId = Dpt.Id) WHERE Dpt.Name like '%Management%'"*
because this statement run much better than *"SELECT this_.departmentName, this_.companyName FROM Department Dpt INNER JOIN Company Co on Co.departmentId = Dpt.Id WHERE Dpt.Name like '%Management%'"* This is a simple example. My problem involves at least 4 tables and many fields for search. The performance of the first script is so much better. Is there any way to do that? Em sábado, 5 de novembro de 2016 15:46:11 UTC-2, César Pistiner escreveu: > > Hi Claudio, > > In *Charpter 15* from the documentation > <http://nhibernate.info/doc/nhibernate-reference/querycriteria.html> you > can find it Detached Criteria and here are > <https://ayende.com/blog/4023/nhibernate-queries-examples> some examples > from Ayende Blog with SQL sentence generated. > > > > > El jue., 3 nov. 2016 a las 21:11, Claudio Cavalcante Tonha (< > [email protected] <javascript:>>) escribió: > >> For performance, it is much better run in that way. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/nhusers. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
