[FLOW3-general] Delete Entity Recursive

Thomas Plessis t.plessis at totemnumerique.com
Thu Oct 4 16:10:14 CEST 2012


Hi Robin,

In your Productgroup entity model, on your OneToMany relation, you can add the following option :  cascade={"remove"} 
Doctrine documentation about that : http://docs.doctrine-project.org/en/2.0.x/reference/working-with-associations.html#transitive-persistence-cascade-operations

regards,

Thomas Plessis
Développeur multimédia
--
TOTEMnumerique
9, Place St Étienne
31000 Toulouse
T. 05 61 14 64 54
F. 05 61 14 64 55

Le 4 oct. 2012 à 14:18, Robin Lehrmann a écrit :

> Hello Together!
> 
> I have create a relation between two Models:
> 
> ProductGroup -> OneToMany -> Product
> 
> In the ProductRepository are a lot of products. I want to delete the ProductGroup and
> all products that has the deleted productGroup.
> 
> Now I should remove all products manually. Is it possibe that the products delete automatically ?
> 
> Cheers,
> 
> Robin.
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general



More information about the FLOW3-general mailing list