mardi 12 janvier 2016

Update operation of a list of rows where there are rows to delete and rows to update

Imagine you have a list of database rows, for example, Order Lines.

You get the lines to the view and here you remove 2 lines, add another 3, and modify 1.

After that, you press the button Save and, what would happen in this update operation? It's easy to detect new lines and modified lines, but what about deleted lines? What is the best solution to solve that problem? I could delete previous lines and reinsert all new and modified lines, but I was thinking it's possible to do this operation in another way. Checking dirty rows or something like that.

By the way, I'm using angular and symfony rest.

Aucun commentaire:

Enregistrer un commentaire