[FLOW3-general] Extending Person, problems deleting

Mathias Bolt Lesniak, LiliO Design mathias at lilio.com
Fri Sep 30 14:18:16 CEST 2011


Hi Christian!

Thanks! Deleting the account worked! :-D


Mathias Bolt Lesniak
LiliO - www.lilio.no
mathias at lilio.com



On 23. sep. 2011, at 18:58, Christian Müller (Kitsunet) wrote:

> 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
>> 
>> 
>> 
>> 
> 
> _______________________________________________
> 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