Disable reload on wakeup for cached queries
This commit is contained in:
parent
8de1dfc484
commit
3afcaf7e12
@ -62,12 +62,13 @@ class Kohana_Database_DB2_Result extends Database_Result {
|
|||||||
}
|
}
|
||||||
elseif (is_string($this->_as_object))
|
elseif (is_string($this->_as_object))
|
||||||
{
|
{
|
||||||
throw new Kohana_Exception('This configuration is not tested for caching');
|
|
||||||
$o = new $this->_as_object;
|
$o = new $this->_as_object;
|
||||||
|
|
||||||
// Return an object of given class name
|
// Return an object of given class name
|
||||||
// @todo This doesnt have $this->_loaded = $this->_valid = TRUE;
|
// @todo This doesnt have $this->_loaded = $this->_valid = TRUE;
|
||||||
return $o->values(db2_fetch_assoc($this->_result));
|
return $o->values(isset($this->_internal_data[$this->_internal_row])
|
||||||
|
? $this->_internal_data[$this->_internal_row]
|
||||||
|
: ($this->_internal_data[$this->_internal_row] = db2_fetch_assoc($this->_result)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -32,6 +32,9 @@ abstract class ORM_DB2 extends ORM {
|
|||||||
$this->_table_name = strtoupper($this->_table_name);
|
$this->_table_name = strtoupper($this->_table_name);
|
||||||
|
|
||||||
parent::_initialize();
|
parent::_initialize();
|
||||||
|
|
||||||
|
// If we are caching queries, we cannot reload on wakeup.
|
||||||
|
$this->_reload_on_wakeup = ! $this->_db->caching();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user