2009年12月30日星期三

[fw-db] Zend_Db_Table_Row recursive cascade delete feature

Hi all,

In looking at the issue:
"Improve cascade delete functionality to support more then one cascade"

located at:
http://framework.zend.com/issues/browse/ZF-1103

it appears it's a feature that a lot of people want. I have created a
patch that adds this functionality, and have given it a brief testing.

I am still working on creating unit tests for this, but the attachment
in the issue adds support for "recursive cascade delete support".

This is an OPT-IN feature. To use it, instead of the 'onDelete' key of
the reference map set to self::CASCADE (or
Zend_Db_Table_Abstract::CASCADE), you would use self::CASCADE_RECURSE.

It should be noted that this is opt-in since it requires additional
selects to find the proper rows that need to be deleted.

I would like people who are interested in this feature to have a look at
it and let me know if it suits your needs. Not only does it suit your
needs, but also think about if there any conceivable issues that might
arise from this feature. If so, I see no reason why this cannot go into
1.10.

Thanks in advance & Happy New Year!
Ralph Schindler

没有评论: