[TYPO3-mvc] Problems with updating / mapping, related issue #9270
Michael Knoll
mimi at kaktusteam.de
Mon Jan 31 17:07:41 CET 2011
Hi there,
I have a problem with updating a domain object and mapping of GP-Vars on
Domain object.
My model "ALBUM" looks like
(album)
+ description
+ galleries --> array<gallery>
+ items --> array<item>
+ name
+ thumb --> item
(item)
+ name
+ description
+ album --> album
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...). 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".
My GP-Vars at this moment look like that (var_dump from
Tx_Extbase_MVC_Controller_Argument::transformValue where the error occurs):
array(3) {
["__identity"]=>
string(1) "1"
["title"]=>
string(12) "Sample Album"
["description"]=>
string(53) "Description..."
}
So as I think, all the "required" properties that should be matched on
my album object "are there".
Can anybody explain me this error and what I can do to prevent it - I
haven't got any idea what's going wrong.
Thanks a lot!
Greetings
Michael
More information about the TYPO3-project-typo3v4mvc
mailing list