From 2ac68a55a4a806a64459b744f76a49e37367ee0d Mon Sep 17 00:00:00 2001 From: Thomas Portelange Date: Thu, 8 Feb 2024 09:13:40 +0100 Subject: [PATCH] rename var --- src/ORM/DataQuery.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ORM/DataQuery.php b/src/ORM/DataQuery.php index 27feb838c..73417ffdd 100644 --- a/src/ORM/DataQuery.php +++ b/src/ORM/DataQuery.php @@ -299,8 +299,8 @@ class DataQuery $collisionClasses = ClassInfo::subclassesFor($collisionClass); $collisionClassesSQL = implode(', ', Convert::raw2sql($collisionClasses, true)); // Only add clause if this is already joined "Unknown column 'ClassName' error" - $collisionTable = $schema->tableForField($collisionClass, 'ClassName'); - if (array_key_exists($collisionTable, $query->getFrom())) { + $collisionTableForClassName = $schema->tableForField($collisionClass, 'ClassName'); + if (array_key_exists($collisionTableForClassName, $query->getFrom())) { $caseClauses[] = "WHEN {$collisionClassColumn} IN ({$collisionClassesSQL}) THEN $collision"; } }