I am having a little trouble forming the following query through Session.CreateCriteria. Here's the setup, I have a parent table and a child table with a 1 to many cardinality between the two tables. What I want is to form a ICriteria query that will retrieve the parent object along with a count of how many child object is associated with the parent object. So all the properties of the parent and a child count in one ICriteria query. Is this possible and how? I've been struggling with the docs and the code for a while, any help would be great. Thanks in advance.
|