From: Coleman Watts Date: Fri, 12 Nov 2021 02:42:36 +0000 (-0500) Subject: APIv4 - Add backticks around fields in join criteria X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8db462f570d91f1064fc2fa5f746ccd33bafdc95;p=civicrm-core.git APIv4 - Add backticks around fields in join criteria Fixes dev/mail#103 --- diff --git a/Civi/Api4/Service/Schema/Joinable/Joinable.php b/Civi/Api4/Service/Schema/Joinable/Joinable.php index 2681466d86..6b5aed9e82 100644 --- a/Civi/Api4/Service/Schema/Joinable/Joinable.php +++ b/Civi/Api4/Service/Schema/Joinable/Joinable.php @@ -104,7 +104,7 @@ class Joinable { */ public function getConditionsForJoin(string $baseTableAlias, string $tableAlias) { $baseCondition = sprintf( - '%s.%s = %s.%s', + '`%s`.`%s` = `%s`.`%s`', $baseTableAlias, $this->baseColumn, $tableAlias,