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

LINQ: Select Key from group by generates wrong SQL

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects versions: 3.2.0.GA
    • Fix versions: 3.3.0.CR1
    • Components: Linq Provider
    • Labels:
      None
    • Sprint:

      Description

      Query

      var list = (from o in db.Orders
      group o by o.OrderDate
      into g
      select g.Key).ToList();

      Generates following SQL

      select
      order0_.* – full fields
      from
      Orders order0_

      instead of

      select
      order0_.OrderDate as OrderDate30_,
      from
      Orders order0_
      group by order0_.OrderDate

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hazzik Alexander Zaytsev
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Who's Looking?