Skip to:
Unable to project collections when using QueryOver:
Customer customerAlias = null;Order orderAlias = null;var list = _session.QueryOver<Customer>(() => customerAlias).JoinAlias(x => x.Orders, () => orderAlias, JoinType.LeftOuterJoin).Select(Projections.Property(() => customerAlias.Name),Projections.Property(() => customerAlias.Orders))//this is the issue.List<object>();
Error returned is:System.IndexOutOfRangeException : Index was outside the bounds of the array
Unable to project collections when using QueryOver:
Customer customerAlias = null;
Order orderAlias = null;
var list = _session.QueryOver<Customer>(() => customerAlias)
.JoinAlias(x => x.Orders, () => orderAlias, JoinType.LeftOuterJoin)
.Select(
Projections.Property(() => customerAlias.Name),
Projections.Property(() => customerAlias.Orders))//this is the issue
.List<object>();
Error returned is:
System.IndexOutOfRangeException : Index was outside the bounds of the array