[TYPO3-mvc] How to remove 1:n from persistence

Heiko Kromm | Paints h.kromm at paints.de
Fri Jul 13 17:50:13 CEST 2012


I checked this on the blog_example. 
There is the same behavior with the comments. 
If you delete a comment it is only detached from the post, but not deleted from database. If I delete a post, the assigned comments will be deleted. 
I thik it schould be possible to set the deleted flag for the comment before it is detached. 

Regards 
Heiko 

----- Ursprüngliche Mail -----

Von: "Heiko Kromm | Paints" <h.kromm at paints.de> 
An: typo3-project-typo3v4mvc at lists.typo3.org 
Gesendet: Donnerstag, 12. Juli 2012 14:50:09 
Betreff: [TYPO3-mvc] How to remove 1:n from persistence 

Hi, 

I have a model which has an 1:n attribute. 
If I remove one item of the attribute with: 
$myModel->removeMyAttribute($attributeToRemove); 
The item is removed from myModel, but stays in persistence. 
I have to update a lot of the relation attributes, and therefore I there are a lot of unused elements in my database. 

How do I get rid of the elements in my database? 

Thanks 
Heiko 
_______________________________________________ 
TYPO3-project-typo3v4mvc mailing list 
TYPO3-project-typo3v4mvc at lists.typo3.org 
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc 



More information about the TYPO3-project-typo3v4mvc mailing list