Hi ,
I try to execute the query that pulls a list of parents and the number
of corresponding child elements.
In T-SQL I would write it like this:
select p.*, isnull(c.cnt, 0)
from parent p
left join (select parentid, count(childid) as cnt from children
group by parentid) c on p.id = c.parentid
Is it possible to get the List of pairs { Parent, ChildrenCount }
using current NH.Linq implementation?
Or using HQL and then AliasToBean result transformer?
I tried both without any luck..
thanks,
Michal
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---