| 
					
						 Hello NHibernatians,
 Please can you tell me how can i implement following in NHibernate 1.2 or any version of NHIbernate. using HQL or Create Criteria
 
 select x.*, y.Count from 
 (select * from Employee u where (u.Id between 1 and 100) 
  {and any other search criteria} ) as x,
 (select Count(*), b.EmployeeCode from Employee b group by b.EmployeeCode ) as y
 where x.EmployeeCode = y.EmployeeCode
 
 or 
 
 select x.*, y.Count from 
 (select * from Employee u where (u.Id between 1 and 100) 
  {and any other search criteria} ) as x 
 inner join 
 (select Count(*), b.EmployeeCode from Employee b group by b.EmployeeCode ) as y
 on x.EmployeeCode = y.EmployeeCode.
 
 Actually I want to use subquery after FROM clause. Can i do this in NHibernate (in any version) using HQL. If we can then tell me how to, else narrate the alternative.
 
 Regards,
 deepsun 
					
  
						
					 |