Ash is not triggering `before_action` hook callback function when updates are atomic
Ash is not triggering before_action hook’s callback function if the update action is atomic, but when I set require_atomic? false in the action, Ash calls thecallback function (request_approval/3) as expected.
The create action works well. I am not sure why the update action is not working as expected on the atomic updates. What could I be getting wrong?
Below is my change:
5 Replies
Solution
Responded on ElixirForum: atomic actions don't support before action hooks
So we're skipping them because we aren't expecting any to be added
It should be an error though
It seems like even before transaction hook isn't supported by atomic updates.
I hope we'll support them in the future.
We cannot 😄
It is essentially the definition of atomicity
that you cannot read the record before updating it.
shouldn't
set_results prevent running underlying datalyer even on atomic update?