projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #19209 from mattwire/daoeventid
[civicrm-core.git]
/
Civi
/
Api4
/
Query
/
SqlField.php
diff --git
a/Civi/Api4/Query/SqlField.php
b/Civi/Api4/Query/SqlField.php
index 712bd7b8cc69bd6da8138f8f8a1b0e34264e4256..b6f69f4d5fb0744df03265abd522fa3b9c1796b5 100644
(file)
--- a/
Civi/Api4/Query/SqlField.php
+++ b/
Civi/Api4/Query/SqlField.php
@@
-16,7
+16,12
@@
namespace Civi\Api4\Query;
*/
class SqlField extends SqlExpression {
*/
class SqlField extends SqlExpression {
+ public $supportsExpansion = TRUE;
+
protected function initialize() {
protected function initialize() {
+ if ($this->alias && $this->alias !== $this->expr) {
+ throw new \API_Exception("Aliasing field names is not allowed, only expressions can have an alias.");
+ }
$this->fields[] = $this->expr;
}
$this->fields[] = $this->expr;
}