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

ActiveQuery::collect() #11842

Merged
merged 2 commits into from
Aug 30, 2022
Merged

ActiveQuery::collect() #11842

merged 2 commits into from
Aug 30, 2022

Conversation

brandonkelly
Copy link
Member

Adds a collect() method to craft\db\ActiveQuery, which returns a collection of the resulting records, similar to craft\db\Query::collect().

use craft\records\Entry as EntryRecord;

$collection = EntryRecord::find()
    ->where(['sectionId' => 10])
    ->collect();

@brandonkelly brandonkelly requested a review from a team as a code owner August 30, 2022 11:26
@linear
Copy link

linear bot commented Aug 30, 2022

[ci skip]
@brandonkelly brandonkelly merged commit 7e07706 into 4.3 Aug 30, 2022
@brandonkelly brandonkelly deleted the feature/dev-981-activequerycollect branch August 30, 2022 11:49
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