[TYPO3-mvc] Add object fails
Gianluca Strafella
gianluca.strafella at webformat.com
Mon Sep 29 08:45:54 CEST 2014
Hi Valeria,
does your Model extend another Model or database table (i.e. a model
that extends another model or may be map an existent database table) ?
Could you post the extention configuration (typoscript and/or
ext_typoscript_setup.txt files content) ?
Regards,
Gianluca Strafella
Software Developer
gianluca.strafella at webformat.com
WEBFORMAT srl – www.webformat.com
Il 18/09/2014 14:38, Valeria Tabolsky ha scritto:
> Hi,
> i'm new in Typo3 world and I try to develop an extension using MVC and
> Flow. I have the controller with a standard set of functions, all of
> them work fine except createAction. Calling to method add() of
> repository I always have an error: Cannot add or update a child row: a
> foreign key constraint fails.
>
> Debugging the code, I see that my object is filled with data, all the
> properties have correct values including the foreign ID that for sure
> exists.
>
> When I use back-end to insert my entities everything works excellent.
> Searching for solution I've found how to print out the last executed
> query and that is what I see:
>
> lastBuiltQuery INSERT INTO tx_links_domain_model_link (pid) VALUES
> ('29')
>
> of course this query is wrong, but where are all the other properties of
> my object? Why aren't they mapped to table columns?
>
> Please somebody help me.
>
>
> PS: I use v.6.2 of typo3, MySQL5 and php5, Windows.
More information about the TYPO3-project-typo3v4mvc
mailing list