I was wondering how people usually go about limiting the number of entities returned from a query. I know about SetMaxResults but this seems to break down as soon as joins are involved - 3 entities with each 2 children will produce 6 rows as a result. If I use SetMaxResults(3) to get only 3 entities I will only get 3 resulting rows which will probably give me an incomplete object graph.

I am aware this is due to the DistinctRootEntityResultTransformer, but I'm wondering what other people do to avoid getting 1000 rows just to get the 6 rows necessary to build my 3 entities.