Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-4460

.NET: Unhelpful error message for same-table SelectMany in LINQ

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 2.0
    • platforms

    Description

      The following LINQ is not supported (RegionToRole is a collection, which is not understood by SQL):

      users.Where(w => w.Value.ID == userId && !w.Value.IsDeleted)
                      .SelectMany(sm => sm.Value.RegionToRole)
      

      However, LINQ engine proceeds to generate an invalid query, which fails later in SQL engine:

      Failed to parse query: select _T0._key, _T0._val from "User".User as _T0 , "User".User as _T0 where  ...
      

      We should detect invalid LINQ early and throw an error with explanation.

      Attachments

        Activity

          People

            ptupitsyn Pavel Tupitsyn
            ptupitsyn Pavel Tupitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: