you need to project:

select p.Id, p.Description, sum(c.HoursCharged)
left join fetch e.Parent p
left join fetch e.Children c
where e.ParentId = :id
group by p.Id, p.Description

Session.CreateQuery(sql)
                   .SetGuid("id", itemId).List<object[]>()
                    .Select(o => new ProjectedResultClass{ActivityId =
(string)o[0], Description = (string)o[1], Hours = (float)o[2]).ToArray();

something like that should work.

2011/1/18 Eric <[email protected]>

> I would like to be able to also load the total time charged to the
> activity.
>

-- 
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.

Reply via email to