platform icon indicating copy to clipboard operation
platform copied to clipboard

Fix missing $joinMap in AbstractQueryConverter

Open sad270 opened this issue 6 years ago • 1 comments

In AbstractQueryConverter::getParentJoinIdForVirtualColumnJoin method, $joinMap variable is missing. So we never enter in last elseif isset($joinMap[$parentAlias]['processed']) And when we have 2 joins in a virtual_fields the second join is not added in DQL

Example:

# src/Oro/Bundle/AccountBundle/Resources/config/oro/entity.yml
oro_entity:
    virtual_fields:
        Oro\Bundle\AccountBundle\Entity\Account:
            contactInformation:
                query:
                    select:
                        expr:         emails.email
                        return_type:  string
                    join:
                        left:
                            - { join: entity.defaultContact, alias: defaultContact }
                            - { join: defaultContact.emails, alias: emails, conditionType: 'WITH', condition: 'emails.primary = true' }

Need for fix this https://github.com/oroinc/crm/pull/346

sad270 avatar Nov 05 '19 13:11 sad270

Thank you for your pull request.

It looks like this may be your first contribution to an Oro, Inc. open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at http://www.orocrm.com/contributor-license-agreement/

If you've already signed the CLA, it's possible we don't have your GitHub username or you're using a different email address. GitHub uses the email address you set in your local Git configuration to associate commits with your GitHub account. Please sign the CLA again using the correct GitHub username and email address or see this help article on setting the email on your git commits.

Once you've signed the CLA, please allow for some time for the submission to be processed.

orocla avatar Nov 05 '19 14:11 orocla