diff --git a/core/model/SQLMap.php b/core/model/SQLMap.php index 809a74ca8..47113cbe6 100755 --- a/core/model/SQLMap.php +++ b/core/model/SQLMap.php @@ -37,7 +37,7 @@ class SQLMap extends Object implements IteratorAggregate { public function getItem($id) { if($id) { $baseTable = reset($this->query->from); - $this->query->where[] = "$baseTable.ID = $id"; + $this->query->where[] = "\"$baseTable\".\"ID\" = $id"; $record = $this->query->execute()->first(); if($record) { $className = $record['ClassName'];