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

Fix reference error in PostgresEventStore for MetadataMatcher with IN Operations #192

Merged
merged 1 commit into from
Apr 9, 2019
Merged

Conversation

fjogeleit
Copy link
Contributor

@fjogeleit fjogeleit commented Apr 1, 2019

Fix reference error in PostgresEventStore for MetadataMatcher with IN Operations.

The removed value reference leads to wrong values for the IN operation.

Example:

(new MetadataMatcher())
	->withMetadataMatch(
	    'event_name',
	    Operator::IN(),
	    [
	        'Event-1',
	        'Event-2'
	    ],
	    FieldType::MESSAGE_PROPERTY()
	)

Results to:

$values = [
	'metadata_0_0' => 'Event-1',
	'metadata_0_1' => 'Event-1'
]

The Second values is replaced by the value reference with the first one.

… Operations.

The removed value reference leads to wrong values for the IN operation.

Example:

```
(new MetadataMatcher())
	->withMetadataMatch(
	    'event_name',
	    Operator::IN(),
	    [
	        'Event-1',
	        'Event-2'
	    ],
	    FieldType::MESSAGE_PROPERTY()
	)
```

Results to:

```
$values = [
	'metadata_0_0' => 'Event-1',
	'metadata_0_1' => 'Event-1'
]
```

The Second values is replaced by the value reference with the first one.
@fjogeleit fjogeleit changed the title Fix reference error in PostgresEventStore for MetadataMatcher with IN… Fix reference error in PostgresEventStore for MetadataMatcher with IN Operations Apr 1, 2019
@coveralls
Copy link

Coverage Status

Coverage remained the same at 89.843% when pulling 416351a on fjogeleit:master into 9f6b1cb on prooph:master.

@prolic
Copy link
Member

prolic commented Apr 2, 2019

Thanks a lot. I'll try to get to it asap. On the nove right now

@prolic prolic added the bug label Apr 9, 2019
@prolic prolic merged commit a868249 into prooph:master Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants