Transactions and rollback for errors when persisting relationships

I’ve come across a situation where I’m persisting an object graph and some of the more deeply nested objects cause an error. I do get the appropriate error back, but the error-free objects in the graph were still persisted. For example, the “one” side of a one-to-many were persisted, but the “many” side objects (which had errors) weren’t.

This particular situation could cause a data integrity issue. Control over transactions and rollbacks would be nice, but I think, at a minimum, if any error in any object occurred during a save(), then the entire save() transaction should be rolled back.

Hi Devin,

This improvement is in our roadmap. I believe it might be even in the upcoming update (to be release within a week). I will double check and report back if it is going to be in there.

Thank you for the ideas and suggestions! Keep them coming, your feedback is very helpful.

Regards,Mark

What news about Transactions?

Are you asking if this is done?

Exectly! When i save a list of object in loop i want to be sure that all items were saved or no one on fail of any

Yes, that’s how it works now. Please let us know if you experience product’s behavior that is different than that.