[Flow] silly issue on 'You need to use $propertyMappingConfiguration->allowProperties('__identity')'
mario chiari
ml at mariochiari.net
Sun Aug 24 00:52:52 CEST 2014
Hi
I am trying to define a silly createAction as below and can't remember
how to do:
createAction(\TYPO3\Blog\Domain\Model\Blog $blog) {
$post = new \TYPO3\Blog\Domain\Model\Post();
$post->setBlog($blog);
$post->setTitle('aaa');
$post->setAuthor('aaa');
$post->setMail('aaa');
$this->postRepository->add($post);
$blog->addpost($post);
$this->blogRepository->update($blog);
$this->addFlashMessage('bla bla');
$this->redirect('index');
}
I get the error msg:
Exception while property mapping for target type
"Doctrine\Common\Collections\Collection<\TYPO3\Blog\Domain\Model\Post>",
at property path "": It is not allowed to map property "__identity". You
need to use $propertyMappingConfiguration->allowProperties('__identity')
to enable mapping of this property.
Shame on me, but I do not remember how I do that.
Thanks, Cheers
mario
ps is there a way to call an action as above from the command line?
More information about the Flow
mailing list