Index: includes/database/database.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/database.inc,v
retrieving revision 1.4
diff -u -p -r1.4 database.inc
--- includes/database/database.inc	8 Sep 2008 21:24:30 -0000	1.4
+++ includes/database/database.inc	14 Sep 2008 02:35:52 -0000
@@ -1007,7 +1007,8 @@ class DatabaseStatement extends PDOState
   public function execute($args, $options) {
     if (isset($options['fetch'])) {
       if (is_string($options['fetch'])) {
-        $this->setFetchMode(PDO::FETCH_CLASS, $options['fetch']);
+        // PDO::FETCH_PROPS_LATE tells __construct() to run before properties are added to the object.
+        $this->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, $options['fetch']);
       }
       else {
         $this->setFetchMode($options['fetch']);
@@ -1024,7 +1025,7 @@ class DatabaseStatement extends PDOState
    *
    * @param $index
    *   The index of the column number to fetch.
-   * @return
+   * @retu
    *   An indexed array.
    */
   public function fetchCol($index = 0) {
