Skip to content

Avoid to truncate WHERE clauses when clonning the querybuilder #1009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

antograssiot
Copy link
Contributor

Q A
Bug fix? yes
New feature? yes/no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

This PR aims to fix a bug introduced by #950
Actually when the querybuilder is cloned, some where parts are stripped.

The issue comes from

    // Change where aliases
    foreach ($wherePart->getParts() as $where) {
        $queryBuilderClone->add('where', str_replace($aliases, $replacements, $where));
    }

because the add() function doesn't append.

There's probably a cleaner way of fixing this, please let me know and i'll update

@antograssiot
Copy link
Contributor Author

Closing in favor of #1010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant