yiisoft / yiisoft/active-record
Ignore unnecessary joinWiths
Open
@dynasource is already working on this.
Since Jul 21, 2017.
- Dominant language
- PHP
- Stars
- 119
- Forks
- 38
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 1
Description
Currently, \yii\db\ActiveQuery allows you to join the same relations twice (or more) with joinWith. Because of that, the DBMS will complain as you are doing multiple joins on the same table.
I am wondering why this isnt fixed with a simple patch to
in which $joinWith gets the relations mapped by their relation $key. This prevents double insertions and those problematic and unnecessary exceptions when you are ensuring that a joinWith is executed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.