Uploaded image for project: 'NHibernate [Moved to GitHub]'
  1. NH-2781

linq's OrderBy by a calculated column doesn't work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.3.0.CR1
    • Component/s: Linq Provider
    • Labels:
      None
    • Sprint:

      Description

      var a = source.Select(s => new

      { s.Email, Revenue = s.CompletedOffers.Sum(c => (decimal?)c.Offer.Revenue) }

      )
      .OrderBy(s => s.Revenue).ToList()

      throws QuerySyntaxException. Message: "Exception of type 'Antlr.Runtime.NoViableAltException' was thrown"

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dromanchenko DmitryR
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Who's Looking?