[TYPO3-mvc] Problems with updating / mapping, related issue #9270

Michael Knoll mimi at kaktusteam.de
Mon Jan 31 23:33:14 CET 2011


Hey Franz,

thanks you very much for your reliable answers on this list :-) 
Unfortunately, in this case your tip did nod lead to a solution... I 
already have the @lazy annotation for my album on the Item model... the 
problems still occur...

I ask myself the question, whether I am doing something wrong or whether 
this is a bug in Extbase. The methods used for mapping the data on the 
model are rather confusing to read so it is not that easy to figure out, 
whether they are not doing what they should my model has a mistake. 
Still I think that this usecase is a rather simple one and it should 
work without any problems... I'm willing to help you out on fixing this, 
if it is a bug but I don't know how to find out, whether it is one...

It would be really nice, if any of you could give me a hand on this!


Greetings

Michael



Am 31.01.11 18:14, schrieb Franz Koch:
> Hey,
>
> ...
>> So there is a circular dependency between album(item) --> item and
>> item(album) --> album.
>>
>> When I edit an album and update it later on, I get a memory-error
>> (allowed memory-size exhausted...).
>
> Watch out on circular references. Best is to use the "@lazy" annotation
> at least for one of the sides of the relation. According to your model
> I'd set the album property of the item to @lazy.
>
>> And if I do something like this:
>>
>> public function updateAction(Tx_Yag_Domain_Model_Album $album) {
>> $this->albumRepository->update($album);
>> $this->flashMessages->add('Album has been updated!');
>> $this->forward('edit', null, null, array('album' => $album));
>> }
>>
>> I get an error: The value must be of type "Tx_Yag_Domain_Model_Album",
>> but was of type "NULL".
>
> Just out of curiosity - does the following work:
> $this->forward('edit', null, null, array('album' => $album->getUid()));
>
> If not, just try $this->forward('edit') as the incoming get/postVars
> should automatically be passed to the new action (unlike on redirects).
>



More information about the TYPO3-project-typo3v4mvc mailing list