Details

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

      Description

      Following query generates extra join:

      var lines = (from l in db.OrderLines
      where l.Order.Customer.CustomerId == "VINET"
      select l).ToList();

      Translated into:

      select
      orderline0_.OrderLineId as OrderLin1_31_,
      orderline0_.OrderId as OrderId31_,
      orderline0_.ProductId as ProductId31_,
      orderline0_.UnitPrice as UnitPrice31_,
      orderline0_.Quantity as Quantity31_,
      orderline0_.Discount as Discount31_
      from
      OrderLines orderline0_
      inner join
      Orders order1_ //this join is unused
      on orderline0_.OrderId=order1_.OrderId
      inner join
      Orders order2_
      on orderline0_.OrderId=order2_.OrderId
      inner join
      Customers customer3_
      on order2_.CustomerId=customer3_.CustomerId
      where
      customer3_.CustomerId=@p0;
      @p0 = 'VINET' Type: String (4000)

        Attachments

          Issue links

            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?