Right -- you must provide a value if you use a natural key, or else you
will get a database error.  
 
There is no need for Zend_Db to enforce this.  The database enforces it,
preventing the insert and returning an error, which is then thrown as a
Zend_Db_Statement_Exception.
 
Regards,
Bill Karwin


________________________________

        From: Julien Pauli [mailto:[EMAIL PROTECTED] 
        Sent: Monday, September 03, 2007 1:47 PM
        To: Zend Framework General
        Subject: [fw-general] Zend_Db_Table $_sequence set to false AND
inserting row with no PK value
        
        
        Hi,
        
        In the manual it is written that if you put $_sequence to
boolean false, in your ORM definition ( extending Zend_Db_Table_Abstract
), then you'll be forced to provide values for PKs while inserting a new
row. 
        
        However, this feature does not seem to be present actually ..?
        inserting blank value still proxies to Adapter and creates a DB
error ( caused by a NULL to be inserted on a PK col ) that give
logically a Zend_Db_Statement_Exception 
        
        Thx for response.
        
        Julien.
        

Reply via email to