For upcasting events we’ve got quite some convenience classes to simplify the live of a upcaster-writing-developer.
For Saga’s, not so much however.
For events we for example have the SingleEventUpcaster, whilst for Saga’s you should provide your own implementation of a SingleEntryUpcaster specific for your Saga you’re upcasting.
Your hunch on using the @Revision annotation to fill the revision column for sagas is correct though.
The Axon Serializers have a RevisionResolver field, which they use to pull the value out of the @Revision annotation, and it does so for Sagas and Events a like.
You are however by no means inclined to put @Revision(“1”) on all your Sagas though.
That’s similarly not required for Events, as it’s perfectly fine for the revision column to start at null and move to 1 (or whatever versioning scheme you’d prefer) after that.
I have been checking in our codebase how to wire the upcasters for a Saga in Axon 3.x, which I’d say should fit in with the Repository or SagaStore, but I’m failing to find where it fits in…
Maybe somebody else can shed some light on that for you (and me in that respect).
So I figure this will shed some light on the situation, although it’s not the full solution yet.
Again, sorry for that.