[FLOW3-general] Foreign Key Handling

Erik Frister ef at aijko.de
Mon Dec 13 20:54:19 CET 2010


Hi Robert,

thanks for your reply. So if I understood you correctly, aggregates will 
automatically be deleted when their aggregate root is deleted, but as 
soon as an object gets its own repository, I can no longer add any 
custom relations to other objects? Will something like this be 
implemented in the future?

Thanks,
Erik

Robert Lemke wrote:
> 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