[FLOW3-general] Foreign Key Handling

Robert Lemke robert at typo3.org
Mon Dec 13 11:14:16 CET 2010


Hi Erik,

Am 11.12.2010 um 20:08 schrieb Erik Frister:

> quick questions: in the tutorial, when I delete the blog, would all related posts and the comments for each post also automatically be deleted, or do I have to program that myself in the controller? Is there an option how to handle those foreign key constraints?

If you delete a blog, the posts will currently not be deleted, because they reside in their own repository (PostRepository) and we don't have any further foreign key constraints implemented yet.

If you delete a Post though, all related comments will be deleted with it.

So, the suggestion is, for now, to extend the remove() method in the BlogRepository and make sure to remove all Posts while removing a Blog.

Cheers,
Robert



More information about the FLOW3-general mailing list