Uploaded image for project: 'NHibernate'
  1. NHibernate
  2. NH-3176

Ability to project collections using QueryOver

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.3.0.GA
    • Fix Version/s: None
    • Component/s: QueryOver

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              evilrabbit Evil Rabbit
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Who's Looking?