-
-
Notifications
You must be signed in to change notification settings - Fork 514
Closed
Description
Bug Report
| Q | A |
|---|---|
| BC Break | no |
| Version | 2.10.0 |
Summary
Problem when having a "discriminatorValue" with value 0
Current behavior
When the query is being composed, it checks this condition in DocumentPersister.php:1473
if (! $key) {
continue;
}
However, this means that having a discriminatorValue with a value of 0 is not allowed. Shouldn't it be something like $key !== false instead?
How to reproduce
Perform any document search when child classes have a discriminator with a value of 0.
const CONTENT_TYPE_NWS = 0;
const CONTENT_TYPE_IMA = 1;
const MAPPING = [
self::CONTENT_TYPE_NWS => ContentNews::class,
self::CONTENT_TYPE_IMA => ContentImage::class,
];
Reactions are currently unavailable