batch saving

It would be cool to be able to batch save multiple objects at once. My UI allows to drag and drop to re-order elements which updates an order property. So, for example, moving an object from the top to the bottom has to update and save the order for all the elements in between. These are top-level objects so they don’t share a common parent that can be saved instead.

I’m currently saving each instance as I loop through them. It seems to work fine, but do you think firing off many save requests right after another would be ok under load?

I had asked about Transaction support awhile back and it was mentioned that you could just save the parent object which saves everything underneath it recursively. Since this situation involves top level items there doesn’t exist a common parent to save.

My ideal situation would be to batch all these order changes in one step. If any one of the individual saves error, then be able to rollback any of the successes, in order to prevent sorts orders from getting out of sync.

Hi, Devin,
Which SDK are you using?

actionscript

Hi Devin,

As a (temporary) suggestion, think of a way to group the elements with a common parent entity. That way it will be trivially easy to save all the elements with a single call. As an added benefit, you’ll be able to load them all with a single call as well.

Regards,
Mark

I figured out a way to do just that. Works great. Thanks