From e0107e0202914edd25629443a044b6883c18bb83 Mon Sep 17 00:00:00 2001 From: Thomas Portelange Date: Thu, 8 Feb 2024 09:14:27 +0100 Subject: [PATCH] Update src/ORM/DataQuery.php Co-authored-by: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> --- src/ORM/DataQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ORM/DataQuery.php b/src/ORM/DataQuery.php index 73417ffdd..f13f1afdd 100644 --- a/src/ORM/DataQuery.php +++ b/src/ORM/DataQuery.php @@ -298,7 +298,7 @@ class DataQuery $collisionClassColumn = $schema->sqlColumnForField($collisionClass, 'ClassName'); $collisionClasses = ClassInfo::subclassesFor($collisionClass); $collisionClassesSQL = implode(', ', Convert::raw2sql($collisionClasses, true)); - // Only add clause if this is already joined "Unknown column 'ClassName' error" + // Only add clause if this is already joined to avoid "Unknown column 'ClassName'" error $collisionTableForClassName = $schema->tableForField($collisionClass, 'ClassName'); if (array_key_exists($collisionTableForClassName, $query->getFrom())) { $caseClauses[] = "WHEN {$collisionClassColumn} IN ({$collisionClassesSQL}) THEN $collision";