This sounds like an issue I just fixed in ZF 1.0.1:
http://framework.zend.com/issues/browse/ZF-1645

Can you tell me if you're using ZF 1.0.0 or 1.0.1?

Regards,
Bill Karwin

> -----Original Message-----
> From: Justin Hendrickson [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 01, 2007 9:59 AM
> To: [email protected]
> Subject: [fw-general] PHP bug when calling save() on a newly 
> created Zend_Db_Table_Row
> 
> I'm trying to create a row and save it, but I keep getting 
> this error message:
> 'Cannot refresh row as parent is missing'
> 
> I tracked the problem down to Zend_Db_Table_Row_Abstract, line 371:
> $primaryKey = $this->_getTable()->insert($this->_data);
> 
> var_dump($primaryKey) shows it's null.
> 
> Backtracking to insert() in Zend_Db_Table_Abstract, line 788:
> return $this->_db->lastInsertId();
> 
> I changed this to:
> $id = $this->_db->lastInsertId();
> var_dump($id);
> return $id;
> 
> This displayed '273', the next auto increment value for the database.
> 
> For some reason, the value is correctly coming back from the 
> Zend_Db_Adapter, but something is breaking the return value from
> Zend_Db_Table_Abstract::insert() to
> Zend_Db_Table_Row_Abstract::_doInsert().
> 
> I tested with PHP 5.2.1/Ubuntu 7.04 and PHP 5.2.3/Windows 
> Server 2003 SP2.
> 
> Has anyone else encountered this problem? Can anyone share 
> any insight?
> 

Reply via email to