Hi team,
I have a codeless code running as a timer with a bulk save and the same code with a single item save.
The only difference is the kind of update:
- Bulk Upsert
- Deep Save
The records are updated in both programs, but in the first - the timer code - the JSON column is not updated. I have checked the JSON content and it is correct JSON format, exactly the same as with option 2). I am not using relations, so a Deep Save would not be really necessary.
Any idea?
Regards, Joerg
Hello @Jorg_Beyer
To update the JSON column you need to use a special syntax. You can read it in the documentation available at this link.
https://backendless.com/docs/rest/data_updating_json_data.html
If you are using the correct syntax to update a column, then please share how exactly you update the column.
Regards,
Inna
As said, my JSON structure is correct.
Because, I print the JSON structure before savong to the console and copy/paste this into the cell in the table by hand to check the validity of the structure. And it works.
But, the same code does not save it with the BULK save, where the DEEP save for a single record does work.
Any other idea?
I just discussed this case with the team. And this functionality is not implemented. I’ll create an internal ticket to discuss adding this feature.
For now you can only use what is described in the documentation, i.e. bulkUpdate/bulkCreate.
Regards,
Inna
I am not sure whether we are talking about the same topic as this is not a new functionality.
I have two routines with the same logic but with the only difference that the 1. is only processing a single record and the 2. is processing a bulk of records.
- updating one record
- updating multiple records
The logic of the generation of the JSON string is the same in both routines and the output is the same.
The difference is the way of saving and the call of the routines. The 1. is called by an action and the 2. is initiated by a timer. The 1. uses Deep Save and the 2. is using Bulk upsert.
The Bulk upsert is not saving the record but is not throwing an error.
I have no idea how to trace the reason behind it. I am happy to get ideas how to dig deeper.
Log and post here your logic and the response you receive after executing the request(timer).
Thank you for the offer and your support. But, as often, the problem is self-made.
I found a first mistake I made, not the final solution, but a first step. I take it from here.
Regards, Joerg