Skip to content

Conversation

@myieye
Copy link
Contributor

@myieye myieye commented Jan 29, 2025

This PR fixes the problem that if in a single sync:

  • A complex-form-component is created
  • Then deleted
  • Then created again
    We add all the root snapshots first and immediately project them as we add them, and end up trying to project 2 complex-form-components that violate our unique constraint.

The additional tests I added were failing while SaveChanges was inside the loop in the new SnapshotsAdded() (as also decsribed in my comment below). They don't fail when it's outside the loop. So, maybe they add no value.

@myieye myieye force-pushed the introduce-snapshot-scope branch from 715d08a to 67126f0 Compare January 30, 2025 12:45
@myieye myieye merged commit a179986 into main Jan 30, 2025
4 checks passed
@myieye myieye deleted the introduce-snapshot-scope branch January 30, 2025 13:00
@myieye myieye changed the title Introduce snapshot scope for better managing what gets projected Project only the latest snapshot of each entity in a single batch Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants