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

How should projectors handle hypothetical events which have null key? #44

Open
IharBury opened this issue Oct 27, 2016 · 5 comments
Open

Comments

@IharBury
Copy link
Collaborator

Should projectors set up event map to:

  • Throw when an event has null key
  • Skip events with null key
  • Project all events with null key to a special projection with null key (current behavior for RavenDB but not possible for NHibernate)
    ?
@dennisdoomen
Copy link
Collaborator

Maybe the EventMap should protect us from that, even before the projector is being called.

@IharBury
Copy link
Collaborator Author

Actually, after reading some documentation, the current behavior of RavenProjector is even more weird. When an event has null key, it will autogenerate a new key for the projection.

@dennisdoomen
Copy link
Collaborator

Because that's what RavenDB does of course ;-)

@Corniel
Copy link

Corniel commented Jan 23, 2020

And how should a projector handle events where the aggregate id is not stored within the event itself, but only in an event envelope?

@dennisdoomen
Copy link
Collaborator

And how should a projector handle events where the aggregate id is not stored within the event itself, but only in an event envelope?

The adapter between the specific event store implementation and Liquid Projections must make sure the aggregate ID is written to the Transaction.StreamId property. So the projector itself should not be aware of where the aggregate ID is coming from.

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

No branches or pull requests

3 participants