I am trying to utilize the SQLContainer add-on and perform a simple database delete from a MySQL database. I have tried to remove the item from the container and commit the changes, however, the item remains in the database. I have even tried this by passing in the item id of the last item in the container to ensure it was not a problem with the Item id paramater I was passing.
using the primary key column as version column will work just fine, but you will lose optimistic locking. If you would use a dedicated version column, you could update its value (or better yet, have the database do it for you) on each change of the row. This way you could detect situations where some other user has updated the row in between of you reading it and changing it. After the detection you could e.g. notify the user attempting to modify the row and load the most recent state.
Thanks Tepi. That makes sense. I will incorporate that change as the application scales…currently, unique users will be reading/writing to only their private data store. Really cleared things up…