ZF-11422: provide cascading write operations on Zend_Db_Table_Abstract / Zend_Db_Table_Row_Abstract for arbitrary columns

Issue Type: Improvement Created: 2011-05-31T15:25:33.000+0000 Last Updated: 2012-05-29T01:55:19.000+0000 Status: Closed Fix version(s): Reporter: Constantin Ehrenstein (skiller) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Db_Table

  • cascading
  • operations
  • relationships
  • tables
  • write

Related issues: - ZF-6319



At the moment (as of ZF 1.11), cascading write operations such as _cascadeDelete() operate on primary key columns, seemingly due to the assumption that relationships between database tables are established through the primary key of the parent table only.

Why is it necessary to establish a relationship on a column other than a primary key, you ask?

Especially in hybrid web/mobile projects, where data can be generated through a web interface as well as in a mobile app, you need to base your relationships on a uuid rather than an autoincremented ID, since the sequence of IDs in the web (= usually main) and the mobile app's database are very likely out of sync (e.g. while the ID sequence in the mobile app has advanced due to the generation of new data, the ID sequence of the same DB table in the main DB will remain unchanged until the next data synchronization. In the meanwhile, there could have been data entered through the web interface as well, resulting in ID conflicts).


Posted by Adam Lundrigan (adamlundrigan) on 2012-05-28T22:09:55.000+0000

Closing as Duplicate of ZF-1103

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.