Yes, mark the collection extra lazy... and then just do class.Students.Length which will load load the student records but only does a SELECT COUNT(*)
On Mon, Aug 20, 2012 at 11:01 PM, Gustavo Souza Gonçalves < [email protected]> wrote: > Good afternoon everyone! > > I'm studying NHibernate, and decided to make some changes. Among them, I > noticed that some fields are unnecessary. So I bring my doubt: > I have a list, let's call it Class_List within each study class, I can > have N students for each class. Within the list Class_List, I also have > other properties as simple as the name of the class. > How I see it is unnecessary to store how many students I have in the > database, I would, in a single query, how many records I have. This, using > NHibernate. > > Is this possible? How? > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/nhusers/-/EA3iAvR1J0oJ. > 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. > -- Ramon -- 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.
