mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: getItem didn't consider the PostgreSQL SQL syntax. Columns with Capital letters must be quoted. Added quotes to the where clause in getItem. I didn't added quotes to the baseTable because it causes PostgreSQL errors (tables can not be double quoted, just single quoted). (from r109591)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112827 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
458f3b1197
commit
ac33763d05
@ -38,7 +38,7 @@ class SQLMap extends Object implements IteratorAggregate {
|
|||||||
public function getItem($id) {
|
public function getItem($id) {
|
||||||
if($id) {
|
if($id) {
|
||||||
$baseTable = reset($this->query->from);
|
$baseTable = reset($this->query->from);
|
||||||
$this->query->where[] = "$baseTable.ID = $id";
|
$this->query->where[] = "$baseTable.\"ID\" = $id";
|
||||||
$record = $this->query->execute()->first();
|
$record = $this->query->execute()->first();
|
||||||
if($record) {
|
if($record) {
|
||||||
$className = $record['ClassName'];
|
$className = $record['ClassName'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user