Skip to content

Is a snapshot supposed to store only the last event data? or does it store the actual aggregate state of all previous events? #478

Closed Answered by suhailhijry
suhailhijry asked this question in Q&A
Discussion options

You must be logged in to vote

After a bit of digging, turns out that the default getState() function of aggrigates which uses reflections, only returns the public properties, and the larabank repository defines balance and accountLimitHitInARow as protected properties, and by doing so prevents the snapshot from having any state when persisted. I will probably make a PR fixing the issue for future users trying to test the larabank repo.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by suhailhijry
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants