[FLOW3-general] Problem with Partypackage

Martin titusmailing at googlemail.com
Thu Aug 9 12:57:30 CEST 2012


Dear List,

I have massive problems implementing the partypackage.

By now I extended the \TYPO3\Party\Domain\Model\Person(); set the name 
with PersonName()

this is all working until I try to add this Party to the account.

$account = $this->accountFactory->createAccountWithPassword($name, 
$pass, array($defaultRole));
			
$this->accountRepository->add($account);

$studentName = new \TYPO3\Party\Domain\Model\PersonName('', 'erster', 
'mitte','letzter');
			
$student = new \TYPO3\Party\Domain\Model\Person();
$student->setName($studentName);
$student->addAccount($account);
$this->persistenceManager->persistAll();

I will get this Error
'A new entity was found through the relationship 
'TYPO3\FLOW3\Security\Account#party' that was not configured to cascade 
persist operations for entity: 
TYPO3\Party\Domain\Model\Person at 0000000037e9c9080000000061f869ce. To 
solve this issue: Either explicitly call EntityManager#persist() on this 
unknown entity or configure cascade persist this association in the 
mapping for example @ManyToOne(..,cascade={"persist"}). If you cannot 
find out which entity causes the problem implement 
'TYPO3\Party\Domain\Model\AbstractParty#__toString()' to get a clue. '

But I don't get a clue how to fix that. Even I tried to add Person() 
directly.

Can anyone give me a hint to solve this problem?

Cheers

Martin



More information about the FLOW3-general mailing list