Skip to content
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

Multiple joins with same $toExpression overwrite themselves #132

Closed
mrceperka opened this issue Dec 10, 2020 · 1 comment
Closed

Multiple joins with same $toExpression overwrite themselves #132

mrceperka opened this issue Dec 10, 2020 · 1 comment
Labels
Milestone

Comments

@mrceperka
Copy link
Contributor

Describe the bug
Multiple joins with same $toExpression overwrite themselves.

$builder->joinLeft('%table', '%table.id = %table.website_id', 'website', 'placement', 'website');
$builder->joinLeft('%table', '%table.id = %table.group_id', 'group_', 'group_', 'website');

// Redundant query parameter or missing modifier in query fragment 'group_'.

This code is probably the problem:
https://github.com/nextras/dbal/blob/master/src/QueryBuilder/QueryBuilder.php#L297
image

To Reproduce
See description.

Expected behavior
Should not overwrite.

Versions::

  • Database: Maria 10.4
  • Dbal: Dbal 4.0.1
@mrceperka mrceperka added the bug label Dec 10, 2020
hrach pushed a commit that referenced this issue Dec 10, 2020
* Update QueryBuilderTest.joins.phpt

* Possible fix
@hrach
Copy link
Member

hrach commented Dec 10, 2020

fixed by #133

@hrach hrach closed this as completed Dec 10, 2020
@hrach hrach added this to the v5.0 milestone Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants