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); updateInput.setTableName(tableName);
PermissionsHelper.checkTablePermissionThrowing(updateInput, TablePermissionSubType.EDIT); 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<>(); List<QRecord> recordList = new ArrayList<>();
QRecord record = new QRecord(); QRecord record = new QRecord();
record.setTableName(tableName); record.setTableName(tableName);
recordList.add(record); recordList.add(record);
updateInput.setRecords(recordList);
record.setValue(tableMetaData.getPrimaryKeyField(), primaryKey); record.setValue(tableMetaData.getPrimaryKeyField(), primaryKey);
setRecordValuesForInsertOrUpdate(context, tableMetaData, record); 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(); UpdateAction updateAction = new UpdateAction();
UpdateOutput updateOutput = updateAction.execute(updateInput); UpdateOutput updateOutput = updateAction.execute(updateInput);