CRM_Utils_SQL_Select - The default alias for subquery should be more distinctive
authorTim Otten <totten@civicrm.org>
Fri, 16 Jun 2023 02:56:34 +0000 (19:56 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 16 Jun 2023 04:49:17 +0000 (21:49 -0700)
commit57c8e957c2dd1a476eac0d2a7e45204cd427f99c
tree4ff6001fa25d5aeb634e9bb3b28aae6c8bee0804
parent6612cd6dc906db5e1ec1af10cb54e51c4e5025b5
CRM_Utils_SQL_Select - The default alias for subquery should be more distinctive

1. If you're writing basic SQL from scratch, you would expect the symbol `a` to be available to you
   (e.g. for use in column-aliases or join-aliases). It shouldn't be a reserved word.

2. In the case of Api4EntitySetQuery, it's important to use the alias as `a` - because that matches the
   rest of the api4 query-building.
CRM/Utils/SQL/Select.php
Civi/Api4/Query/Api4EntitySetQuery.php
tests/phpunit/CRM/Utils/SQL/SelectTest.php