[TYPO3-mvc] Removing relations in aggregate roots when deleting children

Robert Böttner lists at boettner.it
Thu Apr 15 12:08:54 CEST 2010


Hi Masi,

I already annotated

	 * @lazy
	 * @remove

As far as I understand @cascade remove the child gets deleted along with the parents deletion. For my domain the buttons have to remain even if an App gets deleted because they may belong to another App. What I am looking for is automatically removing the relation to the parent(s) when deleting the child. So it´s sort of the opposite direction. 

Robert.

Am 15.04.2010 um 12:00 schrieb Martin Kutschker:

> Robert Böttner schrieb:
>> Hi all,
>> 
>> in my model I have an object "App" containing (mm) "Button" objects. Does Extbase also remove the relation to the Button in the App object when calling $this->buttonRepository->remove($button);  ? Atm I think it doesn´t or I am doing sth wrong.
> 
> The blog examples solves the issue like this:
> 
> 	/**
> 	 * The posts of this blog
> 	 *
> 	 * @var Tx_Extbase_Persistence_ObjectStorage<Tx_BlogExample_Domain_Model_Post>
> 	 * @lazy
> 	 * @cascade remove
> 	 */
> 	protected $posts;
> 
> Masi
> _______________________________________________
> 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