[Flow] Delete Entity extends TYPO3 Abstractparty
Rocky
rockysynergy at gmail.com
Sun Oct 19 10:49:33 CEST 2014
Hi,
School extends \TYPO3\Party\Domain\Model\AbstractParty. I tried to code SchoolController's DeleteAction within below code:
public function deleteAction(\Hwwcn\Sponsor\Domain\Model\School $school) {
foreach ($school->getAccounts() as $account) {
$school->removeAccount($account);
}
$this->partyRepository->remove($school);
}
But I got error saying: "SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`dev_flow3`.`typo3_flow_security_account`, CONSTRAINT `typo3_flow_security_account_ibfk_1` FOREIGN KEY (`party`) REFERENCES `typo3_party_domain_model_abstractparty` (`persistence_object_identi)"
Any idea please?
More information about the Flow
mailing list