Performance question when editing records from PHP
I have a FM-Solution and I want to be able to edit it via PHP.
The situation usually is as follows:
I have a PHP class that has a corresponding Table in the FM-Database, when someone submits a form on the website that is supposed to edit a record I want that all the variables are passed to the FM-Database.
The two possible solutions I found for this are:
Create an editCommand for every variable and fire them individually
Load the corresponding record via getRecordById, set the data and then save it via commit
the only question is, which approach is more efficient, note that there usually are ~5-10 variables that have to be saved per record.
Any help is appreciated
Thanks in advance