From bbf5b62a685f04529570f845e1afceff9b7b1ac8 Mon Sep 17 00:00:00 2001 From: lsmith Date: Fri, 7 Sep 2007 13:27:02 +0000 Subject: [PATCH] - not use the integer index, instead use the actual value for non emulated enums --- lib/Doctrine/Table.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/Table.php b/lib/Doctrine/Table.php index 4aeb79e58..20027749b 100644 --- a/lib/Doctrine/Table.php +++ b/lib/Doctrine/Table.php @@ -1104,7 +1104,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return $index; } - if ( ! $this->conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM) + if (!$this->conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM) && isset($this->columns[$field]['values'][$index]) ) { return $this->columns[$field]['values'][$index]; @@ -1127,7 +1127,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable if ($index === false || !$this->conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM)) { return $index; } - return ($index+1); + return $value; } /* getColumnCount *