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

QueryOver component with multiple properties results in Sql Error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects versions: 3.3.0.CR1
    • Fix versions: 3.3.0.CR1
    • Components: QueryOver
    • Labels:
    • Sprint:

      Description

      I have an entity which references a component.
      The component has more than one property on it.
      When I queryover the entity, and put a filter .Where(o => o.Component == null) the sql generated has errors and cannot execute.

      The error is
      "Incorrect syntax near the keyword 'as'"

      The sql is:
      SELECT this_.Id as Id0_0_, this_.OrderDate as OrderDate0_0_, this_.Name as Name0_0_ FROM Customer this_ WHERE this_.OrderDate as y0_, this_.Name is null

      Notice the comma after 'as y0_' on the fragment "WHERE this.OrderDate as y0_, this_.Name is null ".

      I've attached a test-case which demonstrates the bug.

        Attachments

          Activity

            People

            • Assignee:
              flukefan Richard Brown
              Reporter:
              graemefoster Graeme Foster
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Who's Looking?