ZF-10824: CamelCase-named tables with flat sequences fail

Description

Got a postgreSQL database and model class class Pro_Model_Name extends Zend_Db_Table_Abstract { protected $_name = 'TableName'; // protected $_primary = 'TableName_ID'; protected $_sequence = 'tablename_id_seq'; ... }

There's an insertion $insert = array( 'TableName_ID'=>$id, 'TableNameType_ID'=>$c, 'Value'=>$v ); $this->insert($insert); It began to fail in 1.11.0 or maybe even earlier.

Fixed this way: 1) Sequence renamed to CamelCase: TableName_id_seq 2) Model prpoperty renamed to protected $_sequence = 'TableName_id_seq';

Comments

This not is an bug of the framework. See the name of the sequence in the db because the postgres already create the sequence automatic with type special serial.

This sequеnce in our project was created manually not with serial. And it worked about a year or even 1,5 on production site version untill we've been reported about this fail.

Here an reproduced http://pastebin.com/tvMFnre4.