zend framework - What happens if you call refresh() on Zend_Db_Table_Row_Abstract after the row has been deleted from the db? -
i'm using zend framework version 1.x
the documentation refresh
method of zend_db_table_row_abstract
says only:
refreshes properties database.
my question method return if row has been deleted database in meantime (ie. other process)?
will able handle situation either returning null or throwing exception?
thanks, jakob
first resfresh()
calls _refresh()
, if $row === null
returns exception
.
protected function _refresh() { $where = $this->_getwherequery(); $row = $this->_gettable()->fetchrow($where); if (null === $row) { require_once 'zend/db/table/row/exception.php'; throw new zend_db_table_row_exception('cannot refresh row parent missing'); } $this->_data = $row->toarray(); $this->_cleandata = $this->_data; $this->_modifiedfields = array(); }
Comments
Post a Comment