Nhibernate, eager loading and paging?

You need to use a distinct root entity result transformer on your query. You haven't said whether you're using HQL or Criteria, but the API is similar for both.

You need to use a distinct root entity result transformer on your query. You haven't said whether you're using HQL or Criteria, but the API is similar for both. // criteria criteria.

SetResultTransformer(Transformers. DistinctRootEntity) This will force the result set to only contain distinct parent entities.

1 I am using the distinct root entity, but it is still counting the mulitple child items each time, not just counting the distinct parent items. – czuroski Dec 10 '10 at 16:03.

You could mark your association property with fetch="subselect" - this also makes sure you don't run into problems with a huge cartesian product at the cost of making two queries for each select.

Using the batch-size hint in your mapping for the child collection is probably the best/easiest way to deal with this. For further discussion, see my answer to this similar question.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions