[FLOW3-general] Extended Person, initializeUpdate Problem

Steffen Wickham steffen at gaming-inc.de
Fri Aug 10 15:10:54 CEST 2012


Hello again Martin,

I hadn't looked in conference package right now but the thrown Exception
is correct right now.
You set the default Person object to the person-property which doesn't
have the matrikel value in it's definition.

As you mentioned you have to create a new model which extends the Person
model of TYPO3.Party and add a "matrikel" value with getter and setter
methods to the class. When you created your class, you have to set the
target type of party-property to your new class (like you did already in
your code snippet) and can create your object automatically.

Cheers
Steffen



Am 10.08.12 13:46, schrieb Martin:
> Hi Folks,
>
> at the moment I am struggeling with an extended PersonModel
> It's creation is fine but the update isn't working so far.
>
> In "class Student extend [..]\Person" I got the field matrikel
> It gets set by creation. Everything is fine by now. But when it gets
> to an update I get this error:
> "Exception while property mapping at property path "party": Property
> "matrikel" was not found in target object of type
> "\TYPO3\Party\Domain\Model\Person"
>
> My initializeUpdateAction looks like this:
>
> /**
> * @return void
> */
> public function initializeUpdateAction() {
>     
> //$this->arguments['account']->getPropertyMappingConfiguration()->setTargetTypeForSubProperty('party','\Abgabe\Domain\Model\Student');
> $this->arguments['account']->getPropertyMappingConfiguration()->setTargetTypeForSubProperty('party','\TYPO3\Party\Domain\Model\Person');
>
> $this->arguments['account']->getPropertyMappingConfiguration()->allowModificationForSubProperty('party');
>
> $this->arguments['account']->getPropertyMappingConfiguration()->allowModificationForSubProperty('party.name');
>
> $this->arguments['account']->getPropertyMappingConfiguration()->allowModificationForSubProperty('student');
>
> }
>
> In my view I get the right data with calling party.matrikel even it's
> stored in student.
>
> I was looking in the conferencePackage they have an extra class
> related to nothing for storing extra Information. Is that the way?
>
> Greetz
>
> Martin
> _______________________________________________
> 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