Fix merge conflict in update method

This commit is contained in:
2023-06-02 09:04:16 -05:00
parent eca176a7f0
commit 5330f3de90

View File

@ -615,24 +615,18 @@ public class QJavalinImplementation
updateInput.setTableName(tableName);
PermissionsHelper.checkTablePermissionThrowing(updateInput, TablePermissionSubType.EDIT);
QTableMetaData tableMetaData = qInstance.getTable(table);
QTableMetaData tableMetaData = qInstance.getTable(tableName);
QJavalinAccessLogger.logStart("update", logPair("table", table), logPair("primaryKey", primaryKey));
QJavalinAccessLogger.logStart("update", logPair("table", tableName), logPair("primaryKey", primaryKey));
List<QRecord> recordList = new ArrayList<>();
QRecord record = new QRecord();
record.setTableName(tableName);
recordList.add(record);
updateInput.setRecords(recordList);
record.setValue(tableMetaData.getPrimaryKeyField(), primaryKey);
setRecordValuesForInsertOrUpdate(context, tableMetaData, record);
updateInput.setRecords(recordList);
record.setValue(tableMetaData.getPrimaryKeyField(), primaryKey);
QJavalinAccessLogger.logStart("update", logPair("table", tableName), logPair("primaryKey", primaryKey));
updateInput.setRecords(recordList);
UpdateAction updateAction = new UpdateAction();
UpdateOutput updateOutput = updateAction.execute(updateInput);