Got some strange behaviour when using Take()
with join. Suppose the following example:
Comment comment = null;
var persons = _repository
.QueryOver()
.Left.JoinAlias(x => x.Comments, () => comment)
.Where(x => x.Age > 20)
.Take(5)
.Future()
.ToList();
Well I'd expect that 5
persons are present in the array, and each of them has a list of N comments
.
But, the result givest 5
persons, with a maximum of 5
comments.
Why is .Take(5)
also restricting the number of comments?
How to achieve the desired result?