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

Martin Kutschker masi-no at spam-typo3.org
Thu Apr 15 12:00:56 CEST 2010


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


More information about the TYPO3-project-typo3v4mvc mailing list