[FLOW3-general] Extending Person, problems deleting

"Christian Müller (Kitsunet)" christian.mueller at typo3.org
Fri Sep 23 18:58:29 CEST 2011


Actually it should be enough to remove the account from the 
accountRepository. Entities should define some cascading normally so if 
you delete from the right end it should trigger deletion of everything 
below that (As should be for an Aggregrate Root according to Domain 
Driven Design).

All the Best,
Christian


On 22/09/11 11:57, Mathias Bolt Lesniak, LiliO Design wrote:
> Hi!
>
> I'm working on my first proper FLOW3 project, so let it be said: I'm a newbie.
>
> I wanted to extend \TYPO3\Party\Domain\Model\Person and created a class called User. It works fine, except from when I want to delete an instance. I thought I should be able to just call "$this->userRepository->remove($user);", but I keep getting exceptions about "foreign key constraint fails".
>
> #23000: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`testdb_test`.`typo3_flow3_security_account`, CONSTRAINT `typo3_flow3_security_account_ibfk_1` FOREIGN KEY (`party_abstractparty`) REFERENCES `typo3_party_domain_model_abstractparty` (`flow3_)
>
> Do I really have to delete every single relation manually?
>
>
> Thanks for all help!
>
> Best wishes
>
> Mathias Bolt Lesniak
> LiliO - www.lilio.no
> mathias at lilio.com
>
>
>
>



More information about the FLOW3-general mailing list