← All changes
|
src/DonationForms/V2/Repositories/DonationFormsRepository.php
+2
-1
4.16.7.2
→
4.18.0
View file →
| @@ -29,8 +29,9 @@ | ||
| 29 | 29 | ->get(); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | + * @since 4.18.0 Alias the posts table so grouped queries can qualify columns (e.g. GROUP BY forms.ID). | |
| 33 | 34 | * @since 2.24.0 |
| 34 | 35 | * |
| 35 | 36 | * @return ModelQueryBuilder<Donation> |
| 36 | 37 | */ |
| @@ -37,9 +38,9 @@ | ||
| 37 | 38 | public function prepareQuery(): ModelQueryBuilder |
| 38 | 39 | { |
| 39 | 40 | $builder = new ModelQueryBuilder(DonationForm::class); |
| 40 | 41 | |
| 41 | - return $builder->from('posts') | |
| 42 | + return $builder->from('posts', 'forms') | |
| 42 | 43 | ->select( |
| 43 | 44 | ['ID', 'id'], |
| 44 | 45 | ['post_title', 'title'], |
| 45 | 46 | ['post_date', 'createdAt'], |