[TYPO3-mvc] Add object fails

Valeria Tabolsky valeria.tabolsky at ext.jrc.ec.europa.eu
Thu Sep 18 14:38:52 CEST 2014


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