Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce user defined unique keys for aggregates #437

Merged
merged 15 commits into from
Jan 16, 2025

Conversation

erikrozendaal
Copy link
Member

@erikrozendaal erikrozendaal commented Dec 24, 2024

TODO:

  • DSL for defining unique keys
  • More tests
  • Documentation
  • Changelog
  • Database migration

@erikrozendaal erikrozendaal force-pushed the aggregate-unique-keys branch 2 times, most recently from 91901ac to 545d7f1 Compare January 6, 2025 10:51
Copy link
Member

@lvonk lvonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a really nice addition. I do prefer a more descriptive style (like ActiveRecord does) for the implementation. This also gives us more flexibility whenever we decide to for instance implement storing these keys differently.

lib/sequent/core/aggregate_root.rb Outdated Show resolved Hide resolved
lib/sequent/core/event_store.rb Outdated Show resolved Hide resolved
@erikrozendaal erikrozendaal requested a review from lvonk January 15, 2025 14:13
@erikrozendaal erikrozendaal marked this pull request as ready for review January 16, 2025 14:30
@erikrozendaal erikrozendaal merged commit a7abf4d into master Jan 16, 2025
7 checks passed
@erikrozendaal erikrozendaal deleted the aggregate-unique-keys branch January 16, 2025 14:34
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.

2 participants