[FLOW3-general] Extended Person, initializeUpdate Problem

Martin titusmailing at googlemail.com
Fri Aug 10 15:31:39 CEST 2012


Hi Steffen,

thx for ur help!

But at the moment I get en error with "Fatal error: Allowed memory size 
of 134217728 bytes exhausted (tried to allocate 24557786 bytes)"

If I set

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.matrikel');
}

I thought after Setting TargetType to my extended class everything will 
be fine, but isn't. Either it's a fault by mycreation, but thats working 
fine, all Models a persited in the Database or its a BUG?
I am not an FLOW3 expert so I try to find the problem at my code, which 
isn't working...

Are there some Ideas why this isn't working as I expected?

Cheers Martin

On 08/10/2012 03:10 PM, Steffen Wickham wrote:
> 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