SmartClient Version: v9.0p_2013-11-15/PowerEdition Development Only
Using the RealtimeMessaging, I noticed that the DataSource.updateCaches method, with an add operation, will duplicate existing records.
I just verified this using the sample #fetchOperationFS, and executing the code:
I thought that it wouldn't duplicate the record, based on the primaryKey.
Is it intended behaviour?
The problem arises when I make a grid.addData, and that grid has subscribed to receive messaging from the 'add' channel.
Have I to check for duplicated records in the 'subscribe' callback?
Using the RealtimeMessaging, I noticed that the DataSource.updateCaches method, with an add operation, will duplicate existing records.
I just verified this using the sample #fetchOperationFS, and executing the code:
Code:
supplyItem.updateCaches({data: [{itemName: "Adding Machine Roll 57x57mm Standard", category: "Adding Machine/calculator Roll", itemID: 1, unitCost: 0.41, SKU: "45300", inStock: true, units: "Roll"}], startRow: 0, endRow: 1, totalRows: 1, status: 0}, {operationType: 'add'})
Is it intended behaviour?
The problem arises when I make a grid.addData, and that grid has subscribed to receive messaging from the 'add' channel.
Have I to check for duplicated records in the 'subscribe' callback?
Comment