Skip to content

Commit

Permalink
Merge pull request #22910 from civicrm/5.48
Browse files Browse the repository at this point in the history
5.48
  • Loading branch information
demeritcowboy authored Mar 9, 2022
2 parents 88e3bfd + 731e6a9 commit b89380e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CRM/Price/BAO/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -1268,4 +1268,19 @@ public static function entityTables(): array {
];
}

/**
* Add contribution id select where.
*
* This overrides the parent to PREVENT additional entity_id based
* clauses being added. Additional filters joining on the participant
* and membership tables just seem too non-performant.
*
* @inheritDoc
*/
public function addSelectWhereClause(): array {
$clauses['contribution_id'] = CRM_Utils_SQL::mergeSubquery('Contribution');
CRM_Utils_Hook::selectWhereClause($this, $clauses);
return $clauses;
}

}

0 comments on commit b89380e

Please sign in to comment.