[FLOW3-general] Problem With Update Action
Karsten Dambekalns
karsten at typo3.org
Thu Apr 19 10:43:40 CEST 2012
Hi Daniel.
On 02.04.12 13:29, daniel andrew wrote:
> I have a problem with update in flow3. Basicly i have 2 tables in MySql.
First of all: no, you do not have 2 tables. I mean, you have, but what
is important are the models. :)
> $this->translationTargetRepository->update($targetObject);
...
> if i execute this action, it will throw an error: *: The object of type
> "TranslationTarget" given to update must be persisted already, but is new*
Well, you have a TranslationTargetRepository - simply add() the new
TranslationTarget to that instead of calling update().
Regards,
Karsten
--
Karsten Dambekalns
TYPO3 Core Developer, FLOW3 / Phoenix Team
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the FLOW3-general
mailing list