ZF-12062: Postgresql: schema isn't included in the sequence when explicitly setting it

Issue Type: Bug Created: 2012-02-16T10:07:32.000+0000 Last Updated: 2012-02-16T10:15:46.000+0000 Status: Open Fix version(s): Reporter: Chris Ramakers (chrisramakers) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Db

  • Zend_Db_Table

Related issues: Attachments:


I have a table 'AssetType' for which the PK uses a sequence called "AssetTypePk_seq", both of which are located in the 'data' schema.

Now when I create concrete implementation of the Zend_Db_Table_Abstract class with $_sequence set to 'AsetTypePk_seq' each insert will fail because Zend_Db_Adapter throws an error that the relation/table for the sequence can't be found.

I've tracked it down to the nextSequenceId method in Zend_Db_Adapter_Pgsql which doesn't take in account the defined schema on the Zend_Db_Table. When just setting the $_sequence property to true (thus auto generating the sequence table name) the schema gets added but the sequence table name isn't correct since it's created using the PK name (which in my case isn't in the sequence name).

tl;dr Whe should be able to either add the schema explicitly to the $_sequence property of Zend_Db_Table or it should add it automatically when calling nextSequenceId() on the pgsql adapter.


No comments to display

Have you found an issue?

See the Overview section for more details.


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

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