>
> 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
>
Just a quick question I came up with...
I have a table where you can put comments on something and at every comment
I can upload multiple files. Something like this:
table_comments (id, title, comment, ...)
table_comment_files (id, comment_id, filename, path,...)
Let's say I build my constraints in my database. If I delete a comment, it
will also delete the records in the files table. But, then, it also needs to
delete the files from the server.
The only way I can do it, before I delete the comment, searching for files
and delete them from the server, hard coded. Or is there another way?
'Cause, let's say, if my comment is on an article. And I delete the article,
then I also have to look there if there are files on the comments, on that
article I want to delete...
-----
http://www.phpscriptor.com/ http://www.phpscriptor.com/
--
View this message in context: http://www.nabble.com/Referencemap%3A-delete-CASCADE-tp20027817p20086177.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论