On Oct 17, 2008, at 9:31 AM, EducatedFool wrote:
Let's say I switch my db to InnoDB. What 'll it return when I try to delete
a parent row when it exists in a child row? Just 'false'?
"ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails"
Can someone say why I just have to keep with MyISAM? Why is that better?
About cascade delete: In my opinion the framework needs to folow the
reference map through all the levels. Don't see why it wouldn't...:-)
I would rather see cascading operations removed from Zend_Db completely. It's not safe to implement cascading operations in client code, because it introduces race conditions. That is, concurrent updates by other clients can interrupt a cascading operation, which can cause broken data integrity.
Regards,
Bill Karwin
没有评论:
发表评论