Select specific columns from subquery in Nhibernate Criteria

278 views Asked by At

How Can I translate the following SQL query to Criteria query:

Select A.TextProperty, B.TextProperty, Count(C.Id)
From A, B, C
Where A.Id In 
(
   Select A.Id, C.Id, Count(C.Id)
   From A, C
   Having Count(C.Id) > 1
)

I know the Where part is incorrect, but I need to find a way to get only the A.Id after the inner/Sub-query select statement is executed.

Is there any way to select only the A.Id property from the sub-query then apply the Where condition on it?!

Please help me figure this out!

0

There are 0 answers