[FLOW3-general] Extended Person, initializeUpdate Problem

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


Hello Martin,

it's hard to say what the problem is correctly without knowing your code
(in this case your model).
Actually the "Fatal error" message is a PHP error and not FLOW3 related
(not at all). It just throws this message because FLOW3 tries to
allocate more memory than the allowed 128 MByte by php.ini.

Is your model a very complex one? Does ist includes/injects many
objects? Does it calculate large amount of data?
Which version of FLOW3 are you using? 1.0 or 1.1?

Greets Steffen



Am 10.08.12 15:31, schrieb Martin:
> 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
>>
> _______________________________________________
> 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