Save Model action - smart save?

edited October 15, 2019 in Questions

Does the Save Model action in the action frame performs save when there are no changes to the model? Does Skuid ignore save when there are no changes?

I only want to perform the save when there are changes. Wonder if I need to use a custom snippet to specifically check if model.hasChanged and then perform the save. I will need to handle rollback in that custom snippet. So I prefer not to do that.

Can you please confirm?



  • edited October 15, 2019
    I don't know the answer, but you could perform the save action on a model that doesn't have any changes and see if the modified date/time changes. If it changes, then it is saving the model, if it doesn't change then it is not saving the model
  • edited April 5, 2018
    I just checked and it appears that the save action only saves if there are model changes, which is exactly what I'd hoped.  If no changes, no save is performed and the record's last modified date does not change.  I'd also like confirmation that this is the intended, supported behavior.  If so, this means we can attempt to save many models on the page and the models without changes should get skipped, right?  That would be a lot better for performance and avoid having to check for changes, so I hope that's right!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!