AshEvents.Events.Changes.ApplyChangedAttributes (ash_events v0.7.0)

Copy Markdown View Source

A change that runs LAST during replay to apply changed_attributes.

This ensures that any attributes set by business logic changes (like set_attribute) are overwritten with the exact values from when the original event was created.

The primary key is handled separately by ApplyReplayPrimaryKey which runs first.

Summary

Functions

atomic(changeset, opts, context)

Callback implementation for Ash.Resource.Change.atomic/3.

change(cs, opts, ctx)

Callback implementation for Ash.Resource.Change.change/3.