Prevent overwriting of identical resources being edited simultaneously

Hello everyone, I am considering realising my next project with Ash. I am currently getting an overview of the available options and have already read Rebecca and Zach’s book. I am currently wondering whether there is a mechanism in Ash that prevents a resource being edited simultaneously from simply being overwritten.

Note: ‘etag header mid-air collisions’.

I’m not sure if this is exactly what you’re looking for, but there is support for optimistic locks.

2 Likes

Thank you, that’s exactly what I’m looking for. The ‘Introduction’ section on the website explains exactly what I mean.

“Often, when working with resources, we want to ensure that a record has not been edited since we last read it. We may want this for UX reasons, or for ensuring data consistency, etc.”

1 Like