Updates are not pushing to the server just the inserts
See original GitHub issueI have detected an important issue while modifying an existing record and pushing to the server. The steps as follows:
- I create a record on client.
- Save the record
- Push the changes
The issue seems to be related to the operations records being lost.
private async Task _SaveModifyOperations<T>(T item, T oldItem) where T : NubeTable, new()
{
var operations = await _changeTracker.TrackModifyAsync(oldItem, item).ConfigureAwait(false);
if (!await _dataStore.AddOperationsAsync(operations.ToArray()).ConfigureAwait(false))
{
throw new StoreOperationFailedException($"Could not save modify operations for item {item.Id}");
}
await _RemoveObsoleteOperationsAfterModifyAsync(operations).ConfigureAwait(false);
}
On after this line, ALL the operations inserted at AddOperationsAsync
simply get deleted:
await _RemoveObsoleteOperationsAfterModifyAsync(operations).ConfigureAwait(false);
So, when Pushing the records, none is found on the operations table.
I removed the line and it seems to work but not sure if the code was there for a specific reason.
Please advise @stefffdev, thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
INSERT & UPDATE not working all of sudden
Hi There,. I have a weired problem going on one of my SQL Server 2000 database where other databases are working fine on...
Read more >SQL update working not insert
So what I actually did is delete the data I was updating. The first attempt 0 updates and all inserts and it worked...
Read more >What could be preventing updates and inserts to a table ...
It seems to be running with no issues, except that it isn't doing anything or ending. This is the same if it's only...
Read more >Code for exec SQL Insert, Add, or updates is not working
I have a web server (PleskHosting Windows) and have created a MS SQL DB. I have a page that lists records in the...
Read more >PSOS, Insert from URL, Webdirect have all stopped working
PSOS and Insert From URL are no longer working. Webdirect is not working either, except on our public facing server in the DMZ....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
SourceLink would be the best solution for that I guess, but I haven’t added it yet, I’ll create a issue for integrating it!
Other than that you would have to download the source code and use references to the projects directly instead of using the nugets.
That’s great news. Thanks for your quick and great support!
On another topic, a newbie question about nuget+github integration. Could you please advise me how can I debug the source code but still using the nuget packages? I was checking that there’s a “SourceLink” library from MS but I can’t make it work, or is not enabled on your project. Thanks!