Anyone? Have I got to fetch all properties of the parent object and build the object manually?
Is there a better way to do this using criteria, Fetch list of parents and count of children? Thanks Kevin On Feb 4, 3:52 pm, Kevin Fairclough <[email protected]> wrote: > Hi > > This should be easy to do, but I cannot figure it out. > I have a recursive object ItemLink object which contains a list of > itself ChildLinks > > I want to get the next level of links with a count of links at the > following level, i.e. the child count. > > Session.CreateQuery("select i, count(children) from ItemLink i left > outer join i.ChildLinks children group by i.id").List() > > The above query doesn't work, but this query does: > Session.CreateQuery("select i.id, count(children) from ItemLink i left > outer join i.ChildLinks children group by i.id").List() > > how can I fetch the whole ItemLink object and also the Count in one > query? > > TIA > Kevin -- 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.
