Bulk update & delete; errors if more than jsut the expected json

This commit is contained in:
2023-03-23 12:44:40 -05:00
parent 1d2acc7364
commit 74cf24a00e
5 changed files with 576 additions and 35 deletions

View File

@ -257,6 +257,14 @@ public class MemoryRecordStore
for(QRecord record : input.getRecords())
{
Serializable primaryKeyValue = ValueUtils.getValueAsFieldType(primaryKeyField.getType(), record.getValue(primaryKeyField.getName()));
if(primaryKeyValue == null)
{
record.addError("Missing value in primary key field");
outputRecords.add(record);
continue;
}
if(tableData.containsKey(primaryKeyValue))
{
QRecord recordToUpdate = tableData.get(primaryKeyValue);