Zend Framework

en-/disable referential integrity

Details

  • Type: Docs:  Improvement Docs: Improvement
  • Status: Resolved Resolved
  • Priority: Trivial Trivial
  • Resolution: Not an Issue
  • Affects Version/s: 0.9.2
  • Fix Version/s: 1.9.3
  • Component/s: Zend_Db_Table
  • Labels:
    None
  • Fix Version Priority:
    Nice to Have

Description

Add an option to enable or disable DRI by Zend_Db_Table. Only if it is set "true" the cascading write operations will be done by Zend_Db_Table. So you can switch easily to a non-DRI rdbms.

Activity

Hide
Bill Karwin added a comment -

The option to control this is in the $_referenceMap variable. Set the 'onUpdate' and 'onDelete' elements to the constant value self::RESTRICT to disable cascading.

I'd be glad to add a paragraph in the docs describing the above more clearly.

Switching RDBMS brands (or switching a MySQL InnoDB table to a MyISAM table) should be a very infrequent change, and would require many other code changes anyway, so changing a single value in the $_referenceMap declaration should be no problem. In my opinion it's not necessary to implement more code in Zend_Db_Table to handle this situation.

Show
Bill Karwin added a comment - The option to control this is in the $_referenceMap variable. Set the 'onUpdate' and 'onDelete' elements to the constant value self::RESTRICT to disable cascading. I'd be glad to add a paragraph in the docs describing the above more clearly. Switching RDBMS brands (or switching a MySQL InnoDB table to a MyISAM table) should be a very infrequent change, and would require many other code changes anyway, so changing a single value in the $_referenceMap declaration should be no problem. In my opinion it's not necessary to implement more code in Zend_Db_Table to handle this situation.
Hide
Jan Pieper added a comment -

Switching RDMBS brands: ok. (code changes)

Switching InnoDB->MyISAM: ok. (infrequent)

...but you can use my application with MyISAM, so you need a application based DRI. If there are InnoDB-Tables you can use RDBMS based DRI.

Show
Jan Pieper added a comment - Switching RDMBS brands: ok. (code changes) Switching InnoDB->MyISAM: ok. (infrequent) ...but you can use my application with MyISAM, so you need a application based DRI. If there are InnoDB-Tables you can use RDBMS based DRI.
Hide
Wil Sinclair added a comment -

This issue should have been fixed for the 1.5 release.

Show
Wil Sinclair added a comment - This issue should have been fixed for the 1.5 release.
Hide
Wil Sinclair added a comment -

Please categorize/fix as needed.

Show
Wil Sinclair added a comment - Please categorize/fix as needed.
Hide
Wil Sinclair added a comment -

This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.

Show
Wil Sinclair added a comment - This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.
Hide
Wil Sinclair added a comment -

Reassigning to Ralph since he's the new maintainer of Zend_Db

Show
Wil Sinclair added a comment - Reassigning to Ralph since he's the new maintainer of Zend_Db
Hide
Ralph Schindler added a comment -

Where would this enable/disable switch go in the api? and how would it get set?

-ralph

Show
Ralph Schindler added a comment - Where would this enable/disable switch go in the api? and how would it get set? -ralph
Hide
Ralph Schindler added a comment -

I do not fully understand what is being asked for here. Since this issue is 2 years old, I feel comfortable saying that it needs some evaluating by the author to determine if its still an issue. Many changes have happened since 0.9.2 and if we can identify as still an issue (with more information), we can reopen.

Show
Ralph Schindler added a comment - I do not fully understand what is being asked for here. Since this issue is 2 years old, I feel comfortable saying that it needs some evaluating by the author to determine if its still an issue. Many changes have happened since 0.9.2 and if we can identify as still an issue (with more information), we can reopen.

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
1h
Original Estimate - 1 hour
Remaining:
1h
Remaining Estimate - 1 hour
Logged:
Not Specified
Time Spent - Not Specified