Feature #88056

mode insertIfNoUpdatePossible

Added by Bernhard Eckl 6 months ago. Updated 5 months ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2019-04-02
Due date:
% Done:

0%

PHP Version:
7.0
Tags:
Complexity:
Sprint Focus:

Description

Formhandler had the option insertIfNoUpdatePossible for records which did not exist. So if the where clause fails, an insert will be executed. It would be great for the form framework.

History

#1 Updated by Susanne Moog 5 months ago

  • Status changed from New to Needs Feedback

Hey,

can you elaborate which where clause you mean and what your use case is? Which inserts are failing / what are you trying to update? I can't quite grasp what you want to achieve.

#2 Updated by Bernhard Eckl 5 months ago

I mean any where clause. If the where clause fails, it should insert instead of update.

E.g. a specific tt_address record belongs to an fe_user. The first time the user sends the form, it should insert a new tt_address record and the next times the user sends the form it should update the existing tt_address record (which matches the where clause).

The same like formhandler had insertIfNoUpdatePossible (http://www.typo3-formhandler.com/documentation/finisher/finisherdb/): If the update fails because the record to be updated does not exist, a new record will be created in the table.

Also available in: Atom PDF