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

Add Support for "event_name" field for MetadataMatcher in InMemoryEventStore #363

Merged
merged 2 commits into from
Mar 26, 2019
Merged

Conversation

fjogeleit
Copy link
Contributor

I have a Prooph\EventStore\Projection\Query wo is using a MetadataMatcher for the MessageProperty event_name (Using PostgreSQL EventStore`.

When I try to test this Query local with a InMemoryEventStore this MetadataMatcher is not working because this field is only supported as messageName / message_name.

To make this test possible this PR also add support for the event_name as field name in the InMemoryEventStore

@fjogeleit
Copy link
Contributor Author

The second commit is only for updating the comment section to pass the Travis CI checks

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 99.01% when pulling 09e92fd on fjogeleit:7.x into 1aac955 on prooph:7.x.

@prolic
Copy link
Member

prolic commented Mar 24, 2019

Why do you refuse to use message_name?

@fjogeleit
Copy link
Contributor Author

fjogeleit commented Mar 24, 2019

Because message_name doesn't work in productive for a PDO based query. It's generating a where clause like message_name = :value but the field name in the PDO EventStore is called event_name. So its thrown an exception.

With this change I can use event_name in production with a PostgresEventStore in my case and also in my tests with an InMemoryEventStore

@codeliner codeliner merged commit a98615b into prooph:7.x Mar 26, 2019
@fjogeleit fjogeleit deleted the 7.x branch March 26, 2019 14:16
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.

None yet

4 participants