Skip to content

Query: Clean-up logic around RemoveConvert #8318

Closed as not planned
Closed as not planned

Description

@maumar

Currently the way we use RemoveConvert in some of the visitors is not very robust. We sometimes remove converts when visiting expression but not bring it back, which can lead to compilation errors for some scenarios where converts are explicitly added by customer.

At the moment we have helper methods for creating EF.Property, member access and assignment that compensates for discrepancies, however ideally we should correct much earlier.

This is problematic to do, because in some places we don't retain information about the converts, e.g.
MemberAccessBindingExpressionVisitor.GetPropertyPath returns list of IPropertyBase as well as root qsre, but not the converts that are needed along the path, so when processing:
((B2)((A2)a).b).c

we get [a] (qsre), A2.b (IProperty), B2,c (IProperty), but the information about converts is lost.

Another issue is that sometimes we construct query models (e.g. for collection navigations) and use the qsre in the selector (referencing MainFromClause, which is EntityQueryable) later on. Again, if the collection is a derived class, we should convert that qsre to the right type - currently we don't.

Activity

  1. added this to the Backlog milestone on Apr 28, 2017
  2. AndriySvyryd commented on Aug 23, 2019

    @AndriySvyryd
    Member

    @smitpatel Fixed/not needed?

  3. smitpatel commented on Aug 23, 2019

    @smitpatel
    Contributor

    Not needed.

  4. removed this from the Backlog milestone on Aug 23, 2019
  5. added theissue type on Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions