Skip to content

Fetch including uncommited during rebuild of projection #3706

Answered by jakobt
ChristPetitjean asked this question in Q&A
Discussion options

You must be logged in to vote

As i understand what is not working for you is if you append multiple events your projection value will be based on the persisted event + the most recent event?

i.e. you do:

  • UserRate(2)
    ... SaveChanges -> Average = 2
  • UserRate(3)
    ... SaveChanges -> Average = 2.5
  • UserRate(1)
    ... SaveChanges -> Average = 2

However if you do

  • UserRate (2)
    ... SaveChanges -> Average 2
  • UserRate(3)
  • UserRate(1)
    ... SaveChanges -> Average 1.5

Is that correctly understood, or is there something else not working?

You can make this work in multiple ways however I would probably change the design instead, but here are some options if you are hellbent on this way of doing things or if you encounter another issue whe…

Replies: 3 comments 1 reply

Comment options

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

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ChristPetitjean
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #3704 on March 07, 2025 21:21.