Skip to main content

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!

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


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!


Reply