Sequent::Core::Persistors::ActiveRecordPersistor fails when record has `belongs_to` while replaying
Opened this issue · 0 comments
lvonk commented
Out of the box Sequent uses the Sequent::Core::Persistors::ActiveRecordPersistor
for replaying events on a Sequent
migration. When a record has a belongs_to
it expects the "parent" record to exist. During replay this is not guaranteed since
the default replay strategy replays on aggregate_id
.
Although we don't expect any validations on projections (records) they should probably be skipped explicitly nonetheless, my guess is that would skip the belongs_to
check as well.
As work around, and recommendation, you should configure Sequent to use the Sequent::Core::Persistors::ReplayOptimizedPostgresPersistor
during replay.