Save Model action - smart save?

edited October 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?

Thanks!

Comments

  • edited October 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
  • and thoroughand thorough Member
    edited April 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.