Zend Framework

Zend_Db_Table_Row_Abstract adds ZEND_DB_ROWNUM to data on _refresh()

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.6.0
  • Fix Version/s: 1.8.0
  • Component/s: Zend_Db_Table
  • Labels:
    None

Description

Zend_Db_Table_Row_Abstract->_refresh() adds ZEND_DB_ROWNUM to the $this->_data and $this->_cleanData arrays.

I am saving a row to the database as part of a transaction (which succeeds and adds ZEND_DB_ROWNUM to the fields). If the subsequent $dbAdapter()->commit() fails, I want to save the row so that I can retrieve the values in the next request cycle.

When you try and reconnect the row to the database using $row->setTable(), or $row->setFromArray() you get an error because ZEND_DB_ROWNUM isn't in the list of columns for the table.

Either Zend_Db_Table_Abstract() should remove the ZEND_DB_ROWNUM from the _data and _cleanData arrays, or Zend_Db_Table->fetchRow() should.

Issue Links

Activity

Hide
Mickael Perraud added a comment -

Could be fixed in conjunction of ZF-2243

Show
Mickael Perraud added a comment - Could be fixed in conjunction of ZF-2243
Hide
Mickael Perraud added a comment -

testStatementFetchColumnEmptyResult in Zend_Db_Statement_OracleTest fails because of this issue

Show
Mickael Perraud added a comment - testStatementFetchColumnEmptyResult in Zend_Db_Statement_OracleTest fails because of this issue
Hide
Mickael Perraud added a comment -

Fixed in SVN13759 for Oracle and Pdo_Oci
Additional tests must follow to close this issue

Show
Mickael Perraud added a comment - Fixed in SVN13759 for Oracle and Pdo_Oci Additional tests must follow to close this issue
Hide
Mickael Perraud added a comment - - edited

Current tests cover the functionality for Oracle's adapter

Show
Mickael Perraud added a comment - - edited Current tests cover the functionality for Oracle's adapter

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: