Issues

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

Issue Type: Bug Created: 2010-12-15T02:32:40.000+0000 Last Updated: 2010-12-18T15:00:23.000+0000 Status: Closed Fix version(s): Reporter: Mamyashev Marat (127) Assignee: Ramon Henrique Ornelas (ramon) Tags: - Zend_Db_Table

Related issues: Attachments:

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

Posted by Ramon Henrique Ornelas (ramon) on 2010-12-18T14:28:07.000+0000

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.

Posted by Mamyashev Marat (127) on 2010-12-18T14:45:24.000+0000

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.

Posted by Ramon Henrique Ornelas (ramon) on 2010-12-18T14:54:19.000+0000

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

Posted by Ramon Henrique Ornelas (ramon) on 2010-12-18T15:00:23.000+0000

Here the SQL http://pastebin.com/yAhyPDM1

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts