[Flow] Switch from DELETE to UPDATE column deleted

Peter R peter at webschuppen.com
Thu Apr 10 12:14:50 CEST 2014


Hello,

is there an easy way to use a column like deleted in TYPO3?
How is it with a dataset which depends on other datasets e.g. delete a post and delete all comments.
A stupid way could be:

$comments = $post->getComments();
$commentsCount = count($comments);
for ($i = 0; $i < $commentsCount; $i++) {
$comments[$i]->setDeleted(1);
$this->commentRepository->update($comments[$i]);
}
$post->setDeleted(1);
$this->postRepository->update($post);

Peter


More information about the Flow mailing list