Have a scenario where I need to only select a few properties from an
entity, but also collections. This seems such a normal situation, yet
cannot find info on projecting collections - only properties.
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
--
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.