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

The method allPopulate in ActiveQuery will execute populate twice during execution #289

Closed
wants to merge 54 commits into from
Closed
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
12c3300
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 9, 2023
be499a5
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 9, 2023
3988dcc
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 9, 2023
424f841
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 9, 2023
b64dde5
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 9, 2023
0f680fe
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 9, 2023
594a222
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 9, 2023
08711a6
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 9, 2023
cb9db0e
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 9, 2023
044755d
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 9, 2023
fa7c4cb
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 9, 2023
0af5333
Update src/BaseActiveRecord.php
niqingyang Dec 10, 2023
baf1889
Update src/ActiveRecordInterface.php
niqingyang Dec 10, 2023
b479a12
Revert "Update src/ActiveRecordInterface.php"
niqingyang Dec 10, 2023
0af32f1
Revert "Update src/BaseActiveRecord.php"
niqingyang Dec 10, 2023
c84a97d
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 10, 2023
2b82b2b
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 10, 2023
32cc7b4
Update tests/Driver/Oracle/ActiveRecordTest.php
niqingyang Dec 11, 2023
8583269
Update tests/Driver/Pgsql/ActiveRecordTest.php
niqingyang Dec 11, 2023
e299dfa
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 11, 2023
1f86104
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 11, 2023
43f615b
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 11, 2023
418be7d
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 11, 2023
564e019
implement the interface ArrayableInterface for BaseActiveRecord
niqingyang Dec 11, 2023
20e8962
Merge branch 'yiisoft:master' into master
niqingyang Dec 19, 2023
a5ab133
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Dec 19, 2023
ae57733
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Dec 19, 2023
480c0e1
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Dec 19, 2023
5044c91
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Dec 19, 2023
8f360aa
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Dec 19, 2023
0d4ccc0
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Dec 19, 2023
64b5b31
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Dec 19, 2023
d531911
Update src/ActiveRecordFactory.php
niqingyang Dec 27, 2023
c62cd19
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Dec 29, 2023
f488291
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Dec 29, 2023
8430f4a
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Jan 2, 2024
491e8f2
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Jan 2, 2024
6ce2ce3
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Jan 2, 2024
f3158eb
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Jan 2, 2024
7950258
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Jan 2, 2024
919ccb1
Update the comments of the method createQueryTo in ActiveRecordFactor…
niqingyang Jan 2, 2024
2991192
Update src/ActiveQuery.php
niqingyang Jan 3, 2024
ec3a466
Update src/ActiveRecordFactory.php
niqingyang Jan 3, 2024
236c7af
Update src/BaseActiveRecord.php
niqingyang Jan 3, 2024
15e9484
Update src/BaseActiveRecord.php
niqingyang Jan 3, 2024
380e4dc
Update src/BaseActiveRecord.php
niqingyang Jan 3, 2024
80b1a83
Update src/BaseActiveRecord.php
niqingyang Jan 3, 2024
040a83a
Update src/BaseActiveRecord.php
niqingyang Jan 3, 2024
ff9f101
Update src/BaseActiveRecord.php
niqingyang Jan 3, 2024
801b80a
Update src/BaseActiveRecord.php
niqingyang Jan 3, 2024
71b35f2
Apply suggestions from code review
Tigrov Jan 3, 2024
c2b92fb
Merge branch 'yiisoft:master' into master
niqingyang Jan 4, 2024
65d7afe
Merge branch 'yiisoft:master' into master
niqingyang Jan 6, 2024
f95a71d
The method allPopulate in ActiveQuery will execute populate twice dur…
niqingyang Jan 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/ActiveQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,7 @@ private function removeDuplicatedModels(array $models): array
*/
public function allPopulate(): array
{
$rows = $this->all();

if ($rows !== []) {
$rows = $this->populate($rows, $this->indexBy);
}

return $rows;
return $this->all();
}

/**
Expand Down